projects
/
runfinite.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89191ac
)
changing sleep to usleep for higher responsivness
author
Stefan Huber <shuber2@gmail.com>
Thu, 24 Apr 2008 14:29:44 +0000
(16:29 +0200)
committer
Stefan Huber <shuber2@gmail.com>
Thu, 24 Apr 2008 14:29:44 +0000
(16:29 +0200)
src/main.cpp
patch
|
blob
|
history
diff --git
a/src/main.cpp
b/src/main.cpp
index d6d5692f9dd07d52960464f5541028fd49ced05d..c9caf6e6e9def5691f51210495500c92c5a0f02f 100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-181,12
+181,14
@@
int main(int argc, char** argv)
//Nmb of loops=seconds
float loops=0;
//Status flags of child process
- int status, w;
+ int status;
+ //100ms granularity
+ const int ussleep=50000;
do
{
//Kill the child
- if( loops >= maxtime )
+ if( loops
*ussleep/1e6
>= maxtime )
{
if( argVerbose )
printf("Kill child...\n");
@@
-196,7
+198,7
@@
int main(int argc, char** argv)
}
//Sleep a round
-
sleep(1
);
+
usleep(ussleep
);
loops++;
//Test for child