Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 5 of 5) sorted by relevance

/devicemodel/include/
A Dtimer.h35 ts_to_ticks(const uint32_t freq, const struct timespec *const ts) in ts_to_ticks() argument
39 tv_sec_ticks = ts->tv_sec * freq; in ts_to_ticks()
40 tv_nsec_ticks = (ts->tv_nsec * freq) / NS_PER_SEC; in ts_to_ticks()
47 struct timespec *const ts) in ticks_to_ts() argument
53 ts->tv_sec = ns / NS_PER_SEC; in ticks_to_ts()
54 ts->tv_nsec = ns % NS_PER_SEC; in ticks_to_ts()
/devicemodel/hw/platform/
A Dpit.c68 #define vpit_ts_to_ticks(ts) ts_to_ticks(PIT_8254_FREQ, ts) argument
70 #define vpit_ticks_to_ts(tk, ts) ticks_to_ts(PIT_8254_FREQ, tk, ts) argument
108 struct timespec ts; in ticks_elapsed_since() local
110 if (clock_gettime(CLOCK_MONOTONIC, &ts)) in ticks_elapsed_since()
113 if (timespeccmp(&ts, since, <=)) in ticks_elapsed_since()
116 timespecsub(&ts, since); in ticks_elapsed_since()
117 return vpit_ts_to_ticks(&ts); in ticks_elapsed_since()
282 struct itimerspec ts = { 0 }; in pit_timer_start_cntr0() local
302 if (!timespecisset(&ts.it_interval)) in pit_timer_start_cntr0()
322 ts.it_interval = ts.it_value; in pit_timer_start_cntr0()
[all …]
A Drtc.c231 struct timespec ts; in monotonic_time() local
233 return ts.tv_sec; in monotonic_time()
285 ts->tv_nsec = ct->nsec; in clk_ct_to_ts()
296 secs = ts->tv_sec; in clk_ts_to_ct()
321 ct->nsec = ts->tv_nsec; in clk_ts_to_ct()
396 struct timespec ts; in secs_to_rtc() local
412 ts.tv_sec = rtctime; in secs_to_rtc()
413 ts.tv_nsec = 0; in secs_to_rtc()
414 clk_ts_to_ct(&ts, &ct); in secs_to_rtc()
464 struct timespec ts; in rtc_to_secs() local
[all …]
A Dhpet.c81 #define vhpet_ts_to_ticks(ts) ts_to_ticks(HPET_FREQ, ts) argument
83 #define vhpet_ticks_to_ts(tk, ts) ticks_to_ts(HPET_FREQ, tk, ts) argument
88 #define ts_is_zero(ts) timespeccmp(ts, &zero_ts.it_value, ==) argument
89 #define ts_set_zero(ts) do { *(ts) = zero_ts.it_value; } while (0) argument
498 struct itimerspec ts; in vhpet_start_timer() local
513 vhpet_ticks_to_ts(delta, &ts.it_value); in vhpet_start_timer()
514 timespecadd(&ts.it_value, now); in vhpet_start_timer()
517 vhpet_ticks_to_ts(vhpet->timer[n].comprate, &ts.it_interval); in vhpet_start_timer()
519 vhpet_ticks_to_ts(1ULL << 32, &ts.it_interval); in vhpet_start_timer()
525 if (acrn_timer_settime_abs(vhpet_tmr(vhpet, n), &ts)) in vhpet_start_timer()
[all …]
/devicemodel/hw/pci/virtio/
A Dvirtio.c136 struct itimerspec ts; in virtio_start_timer() local
139 ts.it_interval.tv_sec = 0; in virtio_start_timer()
140 ts.it_interval.tv_nsec = 0; in virtio_start_timer()
142 ts.it_value.tv_sec = sec; in virtio_start_timer()
143 ts.it_value.tv_nsec = nsec; in virtio_start_timer()
144 if (acrn_timer_settime(timer, &ts) != 0) { in virtio_start_timer()

Completed in 15 milliseconds