提交 a450fae8 编写于 作者: F facetosea

fix:window time wait

上级 6bfcc2e4
......@@ -76,19 +76,15 @@ int32_t tsem_wait(tsem_t* sem) {
}
int32_t tsem_timewait(tsem_t* sem, int64_t milis) {
return 0;
/*return tsem_wait(sem);*/
#if 0
struct timespec ts;
timespec_get(&ts);
taosClockGetTime(0, &ts);
ts.tv_nsec += ms * 1000000;
ts.tv_sec += ts.tv_nsec / 1000000000;
ts.tv_nsec %= 1000000000;
/*GetSystemTimeAsFileTime(&ft_before);*/
// errno = 0;
rc = sem_timedwait(sem, ts);
int rc;
while ((rc = sem_timedwait(sem, &ts)) == -1 && errno == EINTR) continue;
return rc;
/* This should have timed out */
// assert(errno == ETIMEDOUT);
// assert(rc != 0);
......@@ -103,8 +99,6 @@ int32_t tsem_timewait(tsem_t* sem, int64_t milis) {
// printf("time must advance during sem_timedwait.");
// return 1;
// }
return rc;
#endif
}
#elif defined(_TD_DARWIN_64)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册