Fix: timespec bug where time is greater than 1 seconds
@@ -73,7 +73,8 @@ bool event_wait_timed( struct event * ev,
int ret = 0;
clock_gettime( CLOCK_REALTIME, &ts );
- ts.tv_sec += ms;
+ ts.tv_sec += ms / 1000;
+ ts.tv_nsec += ( ( ms % 1000 ) * 1000000 );
pthread_mutex_lock( &ev->mutex );
while( ev->event_triggered == false && ret == 0 )
