Browse Source

Fix missed endtimeperiod in overrun timer on windows.

Con Kolivas 12 years ago
parent
commit
ffa12a138a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      util.c

+ 2 - 1
util.c

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