Commit 8257d538 authored by Ian Craggs's avatar Ian Craggs

Fix timeout calculation

parent f1c560ec
...@@ -254,7 +254,7 @@ int Thread_wait_sem(sem_type sem, int timeout) ...@@ -254,7 +254,7 @@ int Thread_wait_sem(sem_type sem, int timeout)
#if defined(USE_TRYWAIT) #if defined(USE_TRYWAIT)
int i = 0; int i = 0;
int interval = 10000; /* 10000 microseconds: 10 milliseconds */ int interval = 10000; /* 10000 microseconds: 10 milliseconds */
int count = (1000 / interval) * timeout; /* how many intervals in timeout period */ int count = (1000 * timeout) / interval; /* how many intervals in timeout period */
#else #else
struct timespec ts; struct timespec ts;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment