1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-10 12:41:02 +00:00

Fix missed endtimeperiod in overrun timer on windows.

This commit is contained in:
Con Kolivas 2013-08-18 14:35:01 +10:00
parent ad87db07d9
commit ffa12a138a

3
util.c
View File

@ -945,10 +945,11 @@ static void nanosleep_abstime(struct timespec *ts_end)
gettimeofday(&now, NULL);
now_ns = timeval_to_ns(&now);
if (unlikely(now_ns >= end_ns))
return;
goto out;
diff_ns = end_ns - now_ns;
ns_to_timespec(&ts_diff, diff_ns);
nanosleep(&ts_diff, NULL);
out:
#ifdef WIN32
timeEndPeriod(1);
#endif