]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
adjust from wall clock to internal clock before sleeping
authorAntti Kantee <pooka@iki.fi>
Thu, 16 Apr 2015 13:36:04 +0000 (13:36 +0000)
committerAntti Kantee <pooka@iki.fi>
Thu, 16 Apr 2015 13:36:04 +0000 (13:36 +0000)
lib/librumprun_base/_lwp.c

index c86fdd238d9485f677a1b50a8c5fbcdcad96b390..ccb5688c242bdbbb9e6ad71649155ae3b5599f53 100644 (file)
@@ -206,6 +206,7 @@ _lwp_park(clockid_t clock_id, int flags, const struct timespec *ts,
                bmk_time_t nsecs = ts->tv_sec*1000*1000*1000 + ts->tv_nsec;
 
                if (flags & TIMER_ABSTIME) {
+                       nsecs -= bmk_clock_epochoffset();
                        rv = bmk_sched_nanosleep_abstime(nsecs);
                } else {
                        rv = bmk_sched_nanosleep(nsecs);