| 126 | #else /* _WIN32 */ |
| 127 | |
| 128 | static void getTimespecFromTimeout (struct timespec* ts, int32_t timeout) { |
| 129 | struct timeval tv; |
| 130 | gettimeofday (&tv, 0); |
| 131 | ts->tv_nsec = tv.tv_usec * 1000 + timeout * 1000000; |
| 132 | ts->tv_sec = tv.tv_sec + ts->tv_nsec / 1000000000; |
| 133 | ts->tv_nsec %= 1000000000; |
| 134 | } |
| 135 | int EventCreate (SWelsDecEvent* e, int manualReset, int initialState) { |
| 136 | if (pthread_mutex_init (& (e->m), NULL)) |
| 137 | return 1; |