summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/timer.c b/libglusterfs/src/timer.c
index c2d743b3a28..d8f53a8d18e 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 (&reg->lock);