/openbmc/linux/tools/testing/selftests/timens/ |
H A D | vfork_exec.c | 24 struct timespec *now; member 30 struct timespec *now = args->now, tst; in tcheck() local 35 if (labs(tst.tv_sec - now->tv_sec) > 5) { in tcheck() 48 .now = now, in check_in_thread() 67 if (labs(tst.tv_sec - now->tv_sec) > 5) in check() 69 tst_name, tst.tv_sec, now->tv_sec); in check() 71 if (check_in_thread(tst_name, now)) in check() 79 struct timespec now; in main() local 98 clock_gettime(CLOCK_MONOTONIC, &now); in main() 106 if (check("parent before vfork", &now)) in main() [all …]
|
H A D | exec.c | 23 struct timespec now, tst; in main() local 28 if (sscanf(argv[1], "%ld", &now.tv_sec) != 1) in main() 33 if (labs(tst.tv_sec - now.tv_sec) > 5) in main() 34 return pr_fail("%ld %ld\n", now.tv_sec, tst.tv_sec); in main() 43 clock_gettime(CLOCK_MONOTONIC, &now); in main() 53 if (labs(tst.tv_sec - now.tv_sec) > 5) in main() 55 now.tv_sec, tst.tv_sec); in main() 73 if (labs(tst.tv_sec - now.tv_sec - OFFSET) > 5) in main() 75 now.tv_sec + OFFSET, tst.tv_sec); in main() 79 snprintf(now_str, sizeof(now_str), "%ld", now.tv_sec + OFFSET); in main()
|
/openbmc/linux/include/trace/events/ |
H A D | iocost.h | 24 __field(u64, now) 39 __entry->now = now->now; 40 __entry->vnow = now->vnow; 55 __entry->now, __entry->vnow, __entry->vrate, 82 TP_ARGS(iocg, path, now, old_inuse, new_inuse, 88 __field(u64, now) 98 __entry->now = now->now; 187 TP_ARGS(iocg, path, now, usage_pct, 193 __field(u64, now) 205 __entry->now = now->now; [all …]
|
H A D | alarmtimer.h | 47 TP_PROTO(struct alarm *alarm, ktime_t now), 49 TP_ARGS(alarm, now), 55 __field(s64, now) 62 __entry->now = now; 69 __entry->now 75 TP_PROTO(struct alarm *alarm, ktime_t now), 77 TP_ARGS(alarm, now) 82 TP_PROTO(struct alarm *alarm, ktime_t now), 84 TP_ARGS(alarm, now) 89 TP_PROTO(struct alarm *alarm, ktime_t now), [all …]
|
/openbmc/qemu/hw/rtc/ |
H A D | ds1338.c | 65 struct tm now; in capture_current_time() local 66 qemu_get_timedate(&now, s->offset); in capture_current_time() 67 s->nvram[0] = to_bcd(now.tm_sec); in capture_current_time() 68 s->nvram[1] = to_bcd(now.tm_min); in capture_current_time() 70 int tmp = now.tm_hour; in capture_current_time() 80 s->nvram[2] = to_bcd(now.tm_hour); in capture_current_time() 83 s->nvram[4] = to_bcd(now.tm_mday); in capture_current_time() 84 s->nvram[5] = to_bcd(now.tm_mon + 1); in capture_current_time() 85 s->nvram[6] = to_bcd(now.tm_year - 100); in capture_current_time() 144 struct tm now; in ds1338_send() local [all …]
|
H A D | m41t80.c | 49 struct tm now; in m41t80_recv() local 56 qemu_get_timedate(&now, -1); in m41t80_recv() 63 return to_bcd(now.tm_sec); in m41t80_recv() 65 return to_bcd(now.tm_min); in m41t80_recv() 67 return to_bcd(now.tm_hour); in m41t80_recv() 69 return to_bcd(now.tm_wday); in m41t80_recv() 71 return to_bcd(now.tm_mday); in m41t80_recv() 73 return to_bcd(now.tm_mon + 1); in m41t80_recv() 75 return to_bcd(now.tm_year % 100); in m41t80_recv()
|
/openbmc/u-boot/arch/arm/mach-omap2/ |
H A D | timer.c | 59 unsigned long now, last = readl(&timer_base->tcrr); in __udelay() local 62 now = readl(&timer_base->tcrr); in __udelay() 63 if (last > now) /* count up timer overflow */ in __udelay() 64 tmo -= TIMER_OVERFLOW_VAL - last + now + 1; in __udelay() 66 tmo -= now - last; in __udelay() 67 last = now; in __udelay() 74 ulong now = readl(&timer_base->tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ); in get_timer_masked() local 76 if (now >= gd->arch.lastinc) { /* normal mode (non roll) */ in get_timer_masked() 78 gd->arch.tbl += (now - gd->arch.lastinc); in get_timer_masked() 81 CONFIG_SYS_HZ)) - gd->arch.lastinc) + now; in get_timer_masked() [all …]
|
/openbmc/linux/net/rxrpc/ |
H A D | call_event.c | 26 unsigned long now = jiffies; in rxrpc_propose_ping() local 54 ack_at += now; in rxrpc_propose_delay_ACK() 126 now = ktime_get_real(); in rxrpc_resend() 128 oldest = now; in rxrpc_resend() 260 unsigned long now = jiffies; in rxrpc_begin_service_reply() local 375 unsigned long now, next, t; in rxrpc_input_call_event() local 401 now = jiffies; in rxrpc_input_call_event() 403 if (time_after_eq(now, t)) { in rxrpc_input_call_event() 410 time_after_eq(now, t)) { in rxrpc_input_call_event() 416 if (time_after_eq(now, t)) { in rxrpc_input_call_event() [all …]
|
/openbmc/u-boot/arch/nds32/cpu/n1213/ag101/ |
H A D | timer.c | 98 ulong now = readl(&tmr->timer3_counter) / in get_timer_masked() local 104 if (lastdec >= now) { in get_timer_masked() 109 timestamp += lastdec - now; in get_timer_masked() 120 timestamp += lastdec + TIMER_LOAD_VAL - now; in get_timer_masked() 123 lastdec = now; in get_timer_masked() 155 unsigned long now, last = readl(&tmr->timer3_counter); in __udelay() local 159 now = readl(&tmr->timer3_counter); in __udelay() 160 if (now > last) /* count down timer overflow */ in __udelay() 161 tmo -= TIMER_LOAD_VAL + last - now; in __udelay() 163 tmo -= last - now; in __udelay() [all …]
|
/openbmc/u-boot/arch/arm/cpu/armv7/sunxi/ |
H A D | timer.c | 61 ulong now = TICKS_TO_HZ(read_timer()); in get_timer_masked() local 63 if (now >= gd->arch.lastinc) /* normal (non rollover) */ in get_timer_masked() 64 gd->arch.tbl += (now - gd->arch.lastinc); in get_timer_masked() 68 - gd->arch.lastinc) + now; in get_timer_masked() 70 gd->arch.lastinc = now; in get_timer_masked() 84 ulong now, last = read_timer(); in __udelay() local 87 now = read_timer(); in __udelay() 88 if (now > last) /* normal (non rollover) */ in __udelay() 89 tmo -= now - last; in __udelay() 91 tmo -= TIMER_LOAD_VAL - last + now; in __udelay() [all …]
|
/openbmc/linux/kernel/time/ |
H A D | tick-sched.c | 86 if (ktime_before(now, nextp)) in tick_do_update_jiffies64() 676 ts->idle_entrytime = now; in tick_nohz_stop_idle() 696 ktime_t now, idle; in get_cpu_sleep_time_us() local 702 now = ktime_get(); in get_cpu_sleep_time_us() 996 ktime_t now) in __tick_nohz_full_update_tick() argument 1290 ktime_t now) in tick_nohz_account_idle_time() argument 1294 ts->idle_exittime = now; in tick_nohz_account_idle_time() 1343 ktime_t now; in tick_nohz_idle_exit() local 1355 now = ktime_get(); in tick_nohz_idle_exit() 1435 ktime_t now; in tick_nohz_irq_enter() local [all …]
|
/openbmc/linux/arch/x86/kernel/ |
H A D | rtc.c | 36 int mach_set_cmos_time(const struct timespec64 *now) in mach_set_cmos_time() argument 38 unsigned long long nowtime = now->tv_sec; in mach_set_cmos_time() 57 void mach_get_cmos_time(struct timespec64 *now) in mach_get_cmos_time() argument 66 now->tv_sec = now->tv_nsec = 0; in mach_get_cmos_time() 72 now->tv_sec = now->tv_nsec = 0; in mach_get_cmos_time() 76 now->tv_sec = rtc_tm_to_time64(&tm); in mach_get_cmos_time() 77 now->tv_nsec = 0; in mach_get_cmos_time() 103 int update_persistent_clock64(struct timespec64 now) in update_persistent_clock64() argument 105 return x86_platform.set_wallclock(&now); in update_persistent_clock64()
|
/openbmc/qemu/hw/timer/ |
H A D | mips_gictimer.c | 21 uint32_t vp_index, uint64_t now) in gic_vptimer_update() argument 27 (uint32_t)(now / TIMER_PERIOD); in gic_vptimer_update() 28 next = now + (uint64_t)wait * TIMER_PERIOD; in gic_vptimer_update() 34 uint64_t now) in gic_vptimer_expire() argument 41 gic_vptimer_update(gictimer, vp_index, now); in gic_vptimer_expire() 58 uint64_t now; in mips_gictimer_get_sh_count() local 59 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mips_gictimer_get_sh_count() 64 gic_vptimer_expire(gictimer, i, now); in mips_gictimer_get_sh_count() 74 uint64_t now; in mips_gictimer_store_sh_count() local 80 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mips_gictimer_store_sh_count() [all …]
|
/openbmc/qemu/target/loongarch/tcg/ |
H A D | constant_timer.c | 25 uint64_t now, expire; in cpu_loongarch_get_constant_timer_ticks() local 27 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in cpu_loongarch_get_constant_timer_ticks() 30 return (expire - now) / TIMER_PERIOD; in cpu_loongarch_get_constant_timer_ticks() 37 uint64_t now, next; in cpu_loongarch_store_constant_timer_config() local 41 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in cpu_loongarch_store_constant_timer_config() 42 next = now + (value & CONSTANT_TIMER_TICK_MASK) * TIMER_PERIOD; in cpu_loongarch_store_constant_timer_config() 53 uint64_t now, next; in loongarch_constant_timer_cb() local 56 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in loongarch_constant_timer_cb() 57 next = now + (env->CSR_TCFG & CONSTANT_TIMER_TICK_MASK) * TIMER_PERIOD; in loongarch_constant_timer_cb()
|
/openbmc/dbus-sensors/src/external/ |
H A D | ExternalSensor.cpp | 132 const std::chrono::steady_clock::time_point& now) const in isAliveAndFresh() 142 return (ageElapsed(now) < writeTimeout); in isAliveAndFresh() 146 const std::chrono::steady_clock::time_point& now) in writeBegin() argument 154 writeLast = now; in writeBegin() 176 const std::chrono::steady_clock::time_point& now) const in ageElapsed() 179 return (now - writeLast); in ageElapsed() 183 const std::chrono::steady_clock::time_point& now) const in ageRemaining() 186 return (writeTimeout - ageElapsed(now)); in ageRemaining() 196 auto now = std::chrono::steady_clock::now(); in externalSetTrigger() local 198 writeBegin(now); in externalSetTrigger() [all …]
|
/openbmc/qemu/hw/misc/ |
H A D | mps2-fpgaio.c | 49 return now - muldiv64(count, NANOSECONDS_PER_SECOND, frq); in tickoff_from_counter() 59 int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in resync_counter() local 60 int64_t elapsed = now - s->pscntr_sync_ticks; in resync_counter() 127 int64_t now; in mps2_fpgaio_read() local 152 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mps2_fpgaio_read() 156 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mps2_fpgaio_read() 190 int64_t now; in mps2_fpgaio_write() local 227 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mps2_fpgaio_write() 231 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mps2_fpgaio_write() 259 int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mps2_fpgaio_reset() local [all …]
|
/openbmc/linux/tools/power/cpupower/bench/ |
H A D | benchmark.c | 35 long long now, then; in calculate_timespace() local 44 now = get_time(); in calculate_timespace() 48 timed = (unsigned int)(then - now); in calculate_timespace() 55 now = get_time(); in calculate_timespace() 59 timed = (unsigned int)(then - now); in calculate_timespace() 81 long long now, then; in start_benchmark() local 126 now = get_time(); in start_benchmark() 135 (long)(then - now), sleep_time, in start_benchmark() 152 now = get_time(); in start_benchmark() 156 powersave_time += then - now - sleep_time; in start_benchmark() [all …]
|
/openbmc/linux/block/ |
H A D | blk-iocost.c | 1048 now->now = ktime_to_us(now->now_ns); in ioc_now() 1071 ioc->period_at = now->now; in ioc_start_period() 1328 iocg->activated_at = now->now; in iocg_activate() 1332 ioc->dfgv_period_at = now->now; in iocg_activate() 1391 iocg->delay_at = now->now; in iocg_kick_delay() 1425 iocg->indebt_since = now->now; in iocg_incur_debt() 1554 iocg->wait_since = now->now; in iocg_kick_waitq() 2083 ioc->dfgv_period_at = now->now; in ioc_forgive_debts() 2109 ioc->dfgv_period_at = now->now; in ioc_forgive_debts() 2183 iocg->wait_since = now->now; in ioc_check_iocgs() [all …]
|
/openbmc/u-boot/board/armltd/integrator/ |
H A D | timer.c | 102 unsigned long long now = READ_TIMER; in get_timer_masked() local 104 if(now > lastdec) { in get_timer_masked() 106 total_count += lastdec + TIMER_LOAD_VAL + 1 - now; in get_timer_masked() 108 total_count += lastdec - now; in get_timer_masked() 110 lastdec = now; in get_timer_masked() 113 now = total_count; in get_timer_masked() 114 do_div(now, div_timer); in get_timer_masked() 115 timestamp = now; in get_timer_masked()
|
/openbmc/linux/kernel/trace/ |
H A D | trace_clock.c | 98 u64 now, prev_time; in trace_clock_global() local 116 now = sched_clock_cpu(this_cpu); in trace_clock_global() 119 if ((s64)(now - prev_time) < 0) in trace_clock_global() 120 now = prev_time; in trace_clock_global() 133 if ((s64)(now - prev_time) < 0) in trace_clock_global() 134 now = prev_time; in trace_clock_global() 136 trace_clock_struct.prev_time = now; in trace_clock_global() 144 return now; in trace_clock_global()
|
/openbmc/linux/kernel/sched/ |
H A D | pelt.c | 180 ___update_load_sum(u64 now, struct sched_avg *sa, in ___update_load_sum() argument 185 delta = now - sa->last_update_time; in ___update_load_sum() 191 sa->last_update_time = now; in ___update_load_sum() 297 if (___update_load_sum(now, &se->avg, 0, 0, 0)) { in __update_load_avg_blocked_se() 320 int __update_load_avg_cfs_rq(u64 now, struct cfs_rq *cfs_rq) in __update_load_avg_cfs_rq() argument 322 if (___update_load_sum(now, &cfs_rq->avg, in __update_load_avg_cfs_rq() 346 int update_rt_rq_load_avg(u64 now, struct rq *rq, int running) in update_rt_rq_load_avg() argument 348 if (___update_load_sum(now, &rq->avg_rt, in update_rt_rq_load_avg() 372 int update_dl_rq_load_avg(u64 now, struct rq *rq, int running) in update_dl_rq_load_avg() argument 374 if (___update_load_sum(now, &rq->avg_dl, in update_dl_rq_load_avg() [all …]
|
/openbmc/linux/drivers/md/bcache/ |
H A D | util.c | 165 uint64_t now, duration, last; in bch_time_stats_update() local 169 now = local_clock(); in bch_time_stats_update() 170 duration = time_after64(now, start_time) in bch_time_stats_update() 171 ? now - start_time : 0; in bch_time_stats_update() 172 last = time_after64(now, stats->last) in bch_time_stats_update() 173 ? now - stats->last : 0; in bch_time_stats_update() 188 stats->last = now ?: 1; in bch_time_stats_update() 203 uint64_t now = local_clock(); in bch_next_delay() local 214 d->next = now + NSEC_PER_SEC * 5LLU / 2LLU; in bch_next_delay() 217 d->next = now - NSEC_PER_SEC * 2; in bch_next_delay() [all …]
|
/openbmc/linux/tools/testing/selftests/timers/ |
H A D | nanosleep.c | 103 struct timespec now, target, rel; in nanosleep_test() local 106 if (clock_gettime(clockid, &now)) in nanosleep_test() 108 target = timespec_add(now, ns); in nanosleep_test() 112 clock_gettime(clockid, &now); in nanosleep_test() 114 if (!in_order(target, now)) in nanosleep_test() 118 clock_gettime(clockid, &now); in nanosleep_test() 122 target = timespec_add(now, ns); in nanosleep_test() 124 clock_gettime(clockid, &now); in nanosleep_test() 126 if (!in_order(target, now)) in nanosleep_test()
|
/openbmc/u-boot/drivers/rtc/ |
H A D | ftrtc010.c | 77 unsigned long now; in rtc_get() local 83 now = (ftrtc010_time() + readl(&rtc->record)) / RTC_DIV_COUNT; in rtc_get() 85 now = ftrtc010_time() + readl(&rtc->record); in rtc_get() 88 rtc_to_tm(now, tmp); in rtc_get() 99 unsigned long now; in rtc_set() local 108 now = ftrtc010_time(); in rtc_set() 110 debug("%s(): write %lx to record register\n", __func__, new - now); in rtc_set() 112 writel(new - now, &rtc->record); in rtc_set()
|
/openbmc/u-boot/arch/arm/mach-at91/arm920t/ |
H A D | timer.c | 59 u32 now; in get_timer_raw() local 61 now = readl(&tc->tc[0].cv) & 0x0000ffff; in get_timer_raw() 63 if (now >= gd->arch.lastinc) { in get_timer_raw() 65 gd->arch.tbl += now - gd->arch.lastinc; in get_timer_raw() 68 gd->arch.tbl += now + TIMER_LOAD_VAL - gd->arch.lastinc; in get_timer_raw() 70 gd->arch.lastinc = now; in get_timer_raw() 98 u32 now = get_timer_raw(); in __udelay() local 99 diff = endtime - now; in __udelay()
|