1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 12:10:03 +00:00

timed thread work

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@949 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2007-09-01 21:18:52 +00:00
parent 9001e6857e
commit 06f05f5da8

View 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 */