From 06f05f5da8c39112df01b7b28ed1bdca484ea531 Mon Sep 17 00:00:00 2001 From: Philip Kovacs Date: Sat, 1 Sep 2007 21:18:52 +0000 Subject: [PATCH] timed thread work git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@949 7f574dfc-610e-0410-a909-a81674777703 --- src/timed_thread.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/timed_thread.c b/src/timed_thread.c index 7c4093c8..20275498 100644 --- a/src/timed_thread.c +++ b/src/timed_thread.c @@ -105,9 +105,8 @@ timed_thread_create (void *(*start_routine)(void*), void *arg, unsigned int inte p_timed_thread->start_routine = start_routine; p_timed_thread->arg = arg; - /* current time */ - if (now (&p_timed_thread->absolute_time)) - return NULL; + p_timed_thread->absolute_time.tv_sec=0; + p_timed_thread->absolute_time.tv_nsec=0; /* seconds portion of the microseconds interval */ p_timed_thread->interval_time.tv_sec = (time_t)(interval_usecs / 1000000); @@ -193,7 +192,6 @@ timed_thread_test (timed_thread* p_timed_thread) p_timed_thread->absolute_time.tv_nsec = nowtime.tv_nsec; } - /* acquire runnable_cond mutex */ if (pthread_mutex_lock (&p_timed_thread->runnable_mutex)) return (-1); /* could not acquire runnable_cond mutex, so tell caller to exit thread */