Lines Matching full:time

11  *  - A real time clock
12 * - A one shot HW timer which can be used to awake the CPU at a given time
18 #include <time.h>
34 * Helper function to convert a 64 bit time in microseconds into a string.
40 static char *us_time_to_str(char *dest, uint64_t time) in us_time_to_str() argument
42 if (time != NSI_NEVER) { in us_time_to_str()
48 hour = (time / 3600U / 1000000U) % 24; in us_time_to_str()
49 minute = (time / 60U / 1000000U) % 60; in us_time_to_str()
50 second = (time / 1000000U) % 60; in us_time_to_str()
51 us = time % 1000000; in us_time_to_str()
81 * Ratio of the simulated clock to the real host time
82 * For ex. a clock_ratio = 1+100e-6 means the simulated time is 100ppm faster
83 * than real time
89 * Offset of the simulated time vs the real host time due to drift/clock ratio
90 * until "last_radj_*time"
92 * A positive value means simulated time is ahead of the host time
101 * "simu_time" == simulated time which starts at 0 on boot
105 /* Last host/real time when the ratio was adjusted */
107 /* Last simulated time when the ratio was adjusted */
243 * The timer HW will awake the CPU (without an interrupt) at least when <time>
246 * If there was a previous request for an earlier time, the old one will prevail
250 void hwtimer_wake_in_time(uint64_t time) in hwtimer_wake_in_time() argument
252 if (hw_timer_awake_timer > time) { in hwtimer_wake_in_time()
253 hw_timer_awake_timer = time; in hwtimer_wake_in_time()
275 * During boot set the real time clock simulated time not start
276 * from the real host time
284 * Set a time offset (microseconds) of the RTC simulated time
293 * Set the ratio of the simulated time to host (real) time.
302 * Increase or decrease the RTC simulated time by offset_delta
310 * Adjust the ratio of the simulated time by a factor
316 /* Accumulated real time drift time since last adjustment: */ in hwtimer_adjust_rt_ratio()
345 * Return the current simulated RTC time in microseconds
354 * Return a version of the host time which would have drifted as if the host
355 * real time clock had been running from the simulated clock, and adjusted
358 * Note that this time may be significantly ahead of the simulated time
359 * (the time the embedded kernel thinks it is).
361 * faster than real time.
369 * time split in us and ns. So we keep the full precision for 500 odd in hwtimer_get_pseudohost_rtc_time()
380 * where st = simulated time in hwtimer_get_pseudohost_rtc_time()
381 * rt = real time in hwtimer_get_pseudohost_rtc_time()
382 * last_rt_adj_time = time (real) when the last ratio in hwtimer_get_pseudohost_rtc_time()
384 * last_st_adj_time = time (simulated) when the last ratio in hwtimer_get_pseudohost_rtc_time()
386 * ratio = ratio between simulated time and real time in hwtimer_get_pseudohost_rtc_time()
480 .descript = "Slow down the execution to the host real time, " in nsi_add_time_options()
488 .descript = "Do NOT slow down the execution to real time, but advance " in nsi_add_time_options()
489 "the simulated time as fast as possible and decoupled from " in nsi_add_time_options()
490 "the host time" in nsi_add_time_options()
498 .descript = "Drift of the simulated clock relative to the host real time. " in nsi_add_time_options()
500 ") This option has no effect in non real time mode" in nsi_add_time_options()
508 .descript = "Relative speed of the simulated time vs real time. " in nsi_add_time_options()
509 "For ex. set to 2 to have simulated time pass at double the " in nsi_add_time_options()
510 "speed of real time. " in nsi_add_time_options()
514 "This option has no effect in non real time mode" in nsi_add_time_options()
529 .descript = "Start the simulated real time clock at 0. Otherwise it starts " in nsi_add_time_options()
530 "matching the value provided by the host real time clock" in nsi_add_time_options()
534 .name = "time", in nsi_add_time_options()