Home
last modified time | relevance | path

Searched refs:now (Results 1 – 25 of 2296) sorted by relevance

12345678910>>...92

/openbmc/linux/tools/testing/selftests/timens/
H A Dvfork_exec.c24 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()
37 args->tst_name, tst.tv_sec, now->tv_sec); in tcheck()
44 static int check_in_thread(char *tst_name, struct timespec *now) in check_in_thread() argument
48 .now = now, in check_in_thread()
60 static int check(char *tst_name, struct timespec *now) in check() argument
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()
[all …]
H A Dexec.c23 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 Diocost.h16 TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
19 TP_ARGS(iocg, path, now, last_period, cur_period, vtime),
24 __field(u64, now)
39 __entry->now = now->now;
40 __entry->vnow = now->vnow;
55 __entry->now, __entry->vnow, __entry->vrate,
63 TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
66 TP_ARGS(iocg, path, now, last_period, cur_period, vtime)
70 TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
73 TP_ARGS(iocg, path, now, last_period, cur_period, vtime)
[all …]
H A Dalarmtimer.h47 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 …]
H A Dtimer.h65 __field( unsigned long, now )
73 __entry->now = jiffies;
79 (long)__entry->expires - __entry->now,
100 __field( unsigned long, now )
107 __entry->now = jiffies;
113 __entry->timer, __entry->function, __entry->now,
241 TP_PROTO(struct hrtimer *hrtimer, ktime_t *now),
243 TP_ARGS(hrtimer, now),
247 __field( s64, now )
253 __entry->now = *now;
[all …]
/openbmc/qemu/hw/rtc/
H A Dds1338.c65 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()
82 s->nvram[3] = (now.tm_wday + s->wday_offset) % 7 + 1; 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()
[all …]
H A Dm41t80.c49 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/linux/net/rxrpc/
H A Dcall_event.c26 unsigned long now = jiffies; in rxrpc_propose_ping() local
27 unsigned long ping_at = now + rxrpc_idle_ack_delay; in rxrpc_propose_ping()
31 rxrpc_reduce_call_timer(call, ping_at, now, in rxrpc_propose_ping()
44 unsigned long now = jiffies, ack_at; in rxrpc_propose_delay_ACK() local
54 ack_at += now; in rxrpc_propose_delay_ACK()
57 rxrpc_reduce_call_timer(call, ack_at, now, in rxrpc_propose_delay_ACK()
119 ktime_t now, max_age, oldest, ack_ts; in rxrpc_resend() local
126 now = ktime_get_real(); in rxrpc_resend()
127 max_age = ktime_sub_us(now, jiffies_to_usecs(call->peer->rto_j)); in rxrpc_resend()
128 oldest = now; in rxrpc_resend()
[all …]
/openbmc/u-boot/arch/arm/mach-omap2/
H A Dtimer.c59 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/u-boot/arch/nds32/cpu/n1213/ag101/
H A Dtimer.c96 ulong now = readl(&tmr->timer3_counter) / (TIMER_CLOCK / CONFIG_SYS_HZ); in get_timer_masked() local
98 ulong now = readl(&tmr->timer3_counter) / in get_timer_masked() local
102 debug("%s(): now = %lx, lastdec = %lx\n", __func__, now, lastdec); in get_timer_masked()
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()
[all …]
/openbmc/linux/kernel/time/
H A Dtick-sched.c57 static void tick_do_update_jiffies64(ktime_t now) in tick_do_update_jiffies64() argument
72 if (ktime_before(now, smp_load_acquire(&tick_next_period))) in tick_do_update_jiffies64()
86 if (ktime_before(now, nextp)) in tick_do_update_jiffies64()
96 if (ktime_before(now, tick_next_period)) { in tick_do_update_jiffies64()
103 delta = ktime_sub(now, tick_next_period); in tick_do_update_jiffies64()
185 static void tick_sched_do_timer(struct tick_sched *ts, ktime_t now) in tick_sched_do_timer() argument
210 tick_do_update_jiffies64(now); in tick_sched_do_timer()
221 tick_do_update_jiffies64(now); in tick_sched_do_timer()
648 static void tick_nohz_update_jiffies(ktime_t now) in tick_nohz_update_jiffies() argument
652 __this_cpu_write(tick_cpu_sched.idle_waketime, now); in tick_nohz_update_jiffies()
[all …]
H A Dtimer_list.c23 u64 now; member
47 int idx, u64 now) in print_timer() argument
55 (long long)(ktime_to_ns(hrtimer_get_softexpires(timer)) - now), in print_timer()
56 (long long)(ktime_to_ns(hrtimer_get_expires(timer)) - now)); in print_timer()
61 u64 now) in print_active_timers() argument
91 print_timer(m, timer, &tmp, i, now); in print_active_timers()
99 print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now) in print_base() argument
112 print_active_timers(m, base, now + ktime_to_ns(base->offset)); in print_base()
115 static void print_cpu(struct seq_file *m, int cpu, u64 now) in print_cpu() argument
123 print_base(m, cpu_base->clock_base + i, now); in print_cpu()
[all …]
/openbmc/u-boot/arch/arm/cpu/armv7/sunxi/
H A Dtimer.c61 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/block/
H A Dblk-iocost.c561 u64 now; member
963 static void ioc_refresh_vrate(struct ioc *ioc, struct ioc_now *now) in ioc_refresh_vrate() argument
965 s64 pleft = ioc->period_at + ioc->period_us - now->now; in ioc_refresh_vrate()
1042 static void ioc_now(struct ioc *ioc, struct ioc_now *now) in ioc_now() argument
1047 now->now_ns = ktime_get(); in ioc_now()
1048 now->now = ktime_to_us(now->now_ns); in ioc_now()
1061 now->vnow = ioc->period_at_vtime + in ioc_now()
1062 (now->now - ioc->period_at) * vrate; in ioc_now()
1066 static void ioc_start_period(struct ioc *ioc, struct ioc_now *now) in ioc_start_period() argument
1071 ioc->period_at = now->now; in ioc_start_period()
[all …]
/openbmc/qemu/hw/timer/
H A Dmips_gictimer.c21 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()
62 && timer_expired(gictimer->vptimers[i].qtimer, now)) { in mips_gictimer_get_sh_count()
64 gic_vptimer_expire(gictimer, i, now); in mips_gictimer_get_sh_count()
67 return gictimer->sh_counterlo + (uint32_t)(now / TIMER_PERIOD); in mips_gictimer_get_sh_count()
[all …]
/openbmc/qemu/hw/misc/
H A Dmps2-fpgaio.c42 static uint32_t counter_from_tickoff(int64_t now, int64_t tick_offset, int frq) in counter_from_tickoff() argument
44 return muldiv64(now - tick_offset, frq, NANOSECONDS_PER_SECOND); in counter_from_tickoff()
47 static int64_t tickoff_from_counter(int64_t now, uint32_t count, int frq) in tickoff_from_counter() argument
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()
153 r = counter_from_tickoff(now, s->clk1hz_tick_offset, 1); in mps2_fpgaio_read()
156 now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in mps2_fpgaio_read()
[all …]
/openbmc/linux/arch/x86/kernel/
H A Drtc.c36 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/dbus-sensors/src/external/
H A DExternalSensor.cpp33 objServer(objectServer), writeLast(std::chrono::steady_clock::now()), in ExternalSensor()
81 std::function<void(std::chrono::steady_clock::time_point now)>&& in initWriteHook()
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()
[all …]
/openbmc/qemu/target/loongarch/tcg/
H A Dconstant_timer.c25 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/linux/tools/power/cpupower/bench/
H A Dbenchmark.c35 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()
130 performance_time += then - now - sleep_time; in start_benchmark()
135 (long)(then - now), sleep_time, in start_benchmark()
152 now = get_time(); in start_benchmark()
[all …]
/openbmc/linux/kernel/sched/
H A Dpelt.c180 ___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()
295 int __update_load_avg_blocked_se(u64 now, struct sched_entity *se) in __update_load_avg_blocked_se() argument
297 if (___update_load_sum(now, &se->avg, 0, 0, 0)) { in __update_load_avg_blocked_se()
306 int __update_load_avg_se(u64 now, struct cfs_rq *cfs_rq, struct sched_entity *se) in __update_load_avg_se() argument
308 if (___update_load_sum(now, &se->avg, !!se->on_rq, se_runnable(se), in __update_load_avg_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
[all …]
/openbmc/linux/kernel/trace/
H A Dtrace_clock.c98 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/u-boot/board/armltd/integrator/
H A Dtimer.c102 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/drivers/md/bcache/
H A Dutil.c165 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
213 if (time_before64(now + NSEC_PER_SEC * 5LLU / 2LLU, d->next)) in bch_next_delay()
214 d->next = now + NSEC_PER_SEC * 5LLU / 2LLU; in bch_next_delay()
[all …]
/openbmc/linux/tools/testing/selftests/timers/
H A Dnanosleep.c103 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()

12345678910>>...92