diff options
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/timer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/timer.c b/libglusterfs/src/timer.c index c2d743b3a..d8f53a8d1 100644 --- a/libglusterfs/src/timer.c +++ b/libglusterfs/src/timer.c @@ -136,6 +136,7 @@ void * gf_timer_proc (void *ctx) { gf_timer_registry_t *reg = NULL; + const struct timespec sleepts = {.tv_sec = 1, .tv_nsec = 0, }; if (ctx == NULL) { @@ -178,7 +179,7 @@ gf_timer_proc (void *ctx) else break; } - usleep (1000000); + nanosleep (&sleepts, NULL); } pthread_mutex_lock (®->lock); |