timed thread work
authorPhilip Kovacs <pkovacs@users.sourceforge.net>
Sat, 1 Sep 2007 21:18:52 +0000 (21:18 +0000)
committerPhilip Kovacs <pkovacs@users.sourceforge.net>
Sat, 1 Sep 2007 21:18:52 +0000 (21:18 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@949 7f574dfc-610e-0410-a909-a81674777703

src/timed_thread.c

index 7c4093c..2027549 100644 (file)
@@ -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 */