# HG changeset patch # User Sam Lantinga # Date 1006535465 0 # Node ID dc660aee7d7d3a022c892398064e033d08b037c4 # Parent cf4944faad9686b25054fdf5eb0f6327a79c5f78 Fixed timeout in Linux condition variable implementation diff -r cf4944faad96 -r dc660aee7d7d src/thread/linux/SDL_syscond.c --- a/src/thread/linux/SDL_syscond.c Thu Nov 22 06:34:25 2001 +0000 +++ b/src/thread/linux/SDL_syscond.c Fri Nov 23 17:11:05 2001 +0000 @@ -137,10 +137,10 @@ gettimeofday(&delta, NULL); abstime.tv_sec = delta.tv_sec + (ms/1000); - abstime.tv_nsec = (delta.tv_usec+(ms%1000)) * 1000; - if ( abstime.tv_nsec > 1000000 ) { + abstime.tv_nsec = (delta.tv_usec + (ms%1000) * 1000) * 1000; + if ( abstime.tv_nsec > 1000000000 ) { abstime.tv_sec += 1; - abstime.tv_nsec -= 1000000; + abstime.tv_nsec -= 1000000000; } tryagain: