/linux/include/linux/ |
A D | time64.h | 14 time64_t tv_sec; /* seconds */ member 46 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); in timespec64_equal() 56 if (lhs->tv_sec < rhs->tv_sec) in timespec64_compare() 58 if (lhs->tv_sec > rhs->tv_sec) in timespec64_compare() 69 set_normalized_timespec64(&ts_delta, lhs.tv_sec + rhs.tv_sec, in timespec64_add() 81 set_normalized_timespec64(&ts_delta, lhs.tv_sec - rhs.tv_sec, in timespec64_sub() 92 if (ts->tv_sec < 0) in timespec64_valid() 105 if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) in timespec64_valid_strict() 130 if (ts->tv_sec >= KTIME_SEC_MAX) in timespec64_to_ns() 133 if (ts->tv_sec <= KTIME_SEC_MIN) in timespec64_to_ns() [all …]
|
/linux/tools/testing/selftests/timens/ |
A D | exec.c | 28 if (sscanf(argv[1], "%ld", &now.tv_sec) != 1) in main() 33 if (abs(tst.tv_sec - now.tv_sec) > 5) in main() 34 return pr_fail("%ld %ld\n", now.tv_sec, tst.tv_sec); in main() 53 if (abs(tst.tv_sec - now.tv_sec) > 5) in main() 55 now.tv_sec, tst.tv_sec); in main() 73 if (abs(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()
|
A D | timens.c | 113 child_ts_new.tv_sec = parent_ts_old.tv_sec + offset; in test_gettime() 121 if (difftime(cur_ts.tv_sec, child_ts_new.tv_sec) < precision) { in test_gettime() 124 clocks[clock_index].name, entry, parent_ts_old.tv_sec, in test_gettime() 125 child_ts_new.tv_sec, cur_ts.tv_sec); in test_gettime() 135 if (difftime(cur_ts.tv_sec, parent_ts_old.tv_sec) > DAY_IN_SEC) { in test_gettime() 138 clocks[clock_index].name, entry, parent_ts_old.tv_sec, in test_gettime() 139 child_ts_new.tv_sec, cur_ts.tv_sec); in test_gettime()
|
A D | timer.c | 32 new_value.it_value.tv_sec = 3600; in run_test() 34 new_value.it_interval.tv_sec = 1; in run_test() 38 new_value.it_value.tv_sec += now.tv_sec; in run_test() 58 elapsed = new_value.it_value.tv_sec; in run_test() 101 mtime_now.tv_sec += 70 * 24 * 3600; in main() 102 btime_now.tv_sec += 9 * 24 * 3600; in main()
|
A D | timerfd.c | 40 new_value.it_value.tv_sec = 3600; in run_test() 42 new_value.it_interval.tv_sec = 1; in run_test() 46 new_value.it_value.tv_sec += now.tv_sec; in run_test() 63 elapsed = new_value.it_value.tv_sec; in run_test() 108 mtime_now.tv_sec += 70 * 24 * 3600; in main() 109 btime_now.tv_sec += 9 * 24 * 3600; in main()
|
/linux/fs/ext4/ |
A D | inode-test.c | 89 .expected = {.tv_sec = -0x80000000LL, .tv_nsec = 0L}, 97 .expected = {.tv_sec = -1LL, .tv_nsec = 0L}, 113 .expected = {.tv_sec = 0x7fffffffLL, .tv_nsec = 0L}, 121 .expected = {.tv_sec = 0x80000000LL, .tv_nsec = 0L}, 129 .expected = {.tv_sec = 0xffffffffLL, .tv_nsec = 0L}, 137 .expected = {.tv_sec = 0x100000000LL, .tv_nsec = 0L}, 145 .expected = {.tv_sec = 0x17fffffffLL, .tv_nsec = 0L}, 193 .expected = {.tv_sec = 0x300000000LL, 248 timestamp.tv_sec = get_32bit_time(test_param); in inode_test_xtimestamp_decoding() 253 test_param->expected.tv_sec, in inode_test_xtimestamp_decoding() [all …]
|
/linux/tools/testing/selftests/timers/ |
A D | leap-a-day.c | 62 if (a.tv_sec < b.tv_sec) in in_order() 64 if (a.tv_sec > b.tv_sec) in in_order() 76 ts.tv_sec++; in timespec_add() 142 tx.time.tv_sec, in sigalarm() 151 tx.time.tv_sec, in sigalarm() 246 next_leap = ts.tv_sec; in main() 307 ts.tv_sec = next_leap - 3; in main() 328 now = tx.time.tv_sec; in main() 340 tai.tv_sec, in main() 353 now = tx.time.tv_sec; in main() [all …]
|
A D | inconsistency-check.c | 83 if ((unsigned long)a.tv_sec < (unsigned long)b.tv_sec) in in_order() 85 if ((unsigned long)a.tv_sec > (unsigned long)b.tv_sec) in in_order() 103 now = then = list[0].tv_sec; in consistency_test() 129 printf("%lu:%lu\n", list[i].tv_sec, in consistency_test() 134 delta = list[inconsistent].tv_sec * NSEC_PER_SEC; in consistency_test() 136 delta -= list[inconsistent+1].tv_sec * NSEC_PER_SEC; in consistency_test() 146 now = list[0].tv_sec; in consistency_test()
|
A D | freq-step.c | 45 return ts1->tv_sec - ts2->tv_sec + (ts1->tv_nsec - ts2->tv_nsec) / 1e9; in diff_timespec() 59 ts1.tv_sec -= mono_raw_base; in get_sample() 60 ts2.tv_sec -= mono_base; in get_sample() 61 ts3.tv_sec -= mono_raw_base; in get_sample() 72 sample->time = ts1.tv_sec + ts1.tv_nsec / 1e9; in get_sample() 85 txc.time.tv_sec = 0; in reset_ntp_error() 213 mono_raw_base = ts.tv_sec; in init_test() 220 mono_base = ts.tv_sec; in init_test() 233 srand(ts.tv_sec ^ ts.tv_nsec); in init_test()
|
A D | nanosleep.c | 82 if (a.tv_sec < b.tv_sec) in in_order() 84 if (a.tv_sec > b.tv_sec) in in_order() 96 ts.tv_sec++; in timespec_add() 119 rel.tv_sec = 0; in nanosleep_test()
|
/linux/kernel/time/ |
A D | time.c | 147 if (put_user(ts.tv_sec, &tv->tv_sec) || in SYSCALL_DEFINE2() 206 if (get_user(new_ts.tv_sec, &tv->tv_sec) || in SYSCALL_DEFINE2() 231 if (put_user(ts.tv_sec, &tv->tv_sec) || in COMPAT_SYSCALL_DEFINE2() 303 txc->time.tv_sec = tx32.time.tv_sec; in get_old_timex32() 332 tx32.time.tv_sec = txc->time.tv_sec; in put_old_timex32() 457 tv.tv_sec = ts.tv_sec; in ns_to_kernel_old_timeval() 773 if (unlikely(res.tv_sec < lhs.tv_sec || res.tv_sec < rhs.tv_sec)) { in timespec64_add_safe() 791 ts->tv_sec = kts.tv_sec; in get_timespec64() 808 .tv_sec = ts->tv_sec, in put_timespec64() 826 ts64->tv_sec = ts.tv_sec; in __get_old_timespec32() [all …]
|
A D | itimer.c | 105 v.it_interval.tv_sec = i->it_interval.tv_sec; in put_itimerval() 107 v.it_value.tv_sec = i->it_value.tv_sec; in put_itimerval() 134 v32.it_interval.tv_sec = i->it_interval.tv_sec; in put_old_itimerval32() 136 v32.it_value.tv_sec = i->it_value.tv_sec; in put_old_itimerval32() 285 it_new.it_value.tv_sec = seconds; in alarm_setitimer() 297 it_old.it_value.tv_sec++; in alarm_setitimer() 299 return it_old.it_value.tv_sec; in alarm_setitimer() 325 o->it_interval.tv_sec = v.it_interval.tv_sec; in get_itimerval() 327 o->it_value.tv_sec = v.it_value.tv_sec; in get_itimerval() 371 o->it_interval.tv_sec = v32.it_interval.tv_sec; in get_old_itimerval32() [all …]
|
/linux/tools/testing/selftests/vDSO/ |
A D | vdso_test_correctness.c | 40 long long tv_sec; member 218 if (a->tv_sec != b->tv_sec) in ts_leq() 219 return a->tv_sec < b->tv_sec; in ts_leq() 227 if (a->tv_sec != b->tv_sec) in ts64_leq() 228 return a->tv_sec < b->tv_sec; in ts64_leq() 235 if (a->tv_sec != b->tv_sec) in tv_leq() 236 return a->tv_sec < b->tv_sec; in tv_leq() 290 (unsigned long long)vdso.tv_sec, vdso.tv_nsec, in test_one_clock_gettime() 291 (unsigned long long)end.tv_sec, end.tv_nsec); in test_one_clock_gettime() 355 (unsigned long long)end.tv_sec, end.tv_nsec); in test_one_clock_gettime64() [all …]
|
/linux/fs/fat/ |
A D | fat_test.c | 35 .ts = {.tv_sec = 315532800LL, .tv_nsec = 0L}, 43 .ts = {.tv_sec = 4354819198LL, .tv_nsec = 0L}, 51 .ts = {.tv_sec = 315493200LL, .tv_nsec = 0L}, 59 .ts = {.tv_sec = 4354858798LL, .tv_nsec = 0L}, 67 .ts = {.tv_sec = 825552000LL, .tv_nsec = 0L}, 75 .ts = {.tv_sec = 951782400LL, .tv_nsec = 0L}, 83 .ts = {.tv_sec = 4107542400LL, .tv_nsec = 0L}, 91 .ts = {.tv_sec = 1078014600LL, .tv_nsec = 0L}, 107 .ts = {.tv_sec = 946684799LL, .tv_nsec = 0L}, 146 testcase->ts.tv_sec, in fat_time_fat2unix_test() [all …]
|
/linux/arch/nds32/kernel/vdso/ |
A D | gettimeofday.c | 74 ts->tv_sec = vdata->xtime_coarse_sec; in do_realtime_coarse() 90 ts->tv_sec = vdata->xtime_coarse_sec + vdata->wtm_clock_sec; in do_monotonic_coarse() 95 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_monotonic_coarse() 122 ts->tv_sec = vdata->xtime_clock_sec; in do_realtime() 128 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_realtime() 142 ts->tv_sec = vdata->xtime_clock_sec; in do_monotonic() 147 ts->tv_sec += vdata->wtm_clock_sec; in do_monotonic() 152 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_monotonic() 216 res->tv_sec = 0; in __vdso_clock_getres() 221 res->tv_sec = 0; in __vdso_clock_getres() [all …]
|
/linux/fs/coda/ |
A D | coda_linux.c | 72 .tv_sec = ts.tv_sec, in coda_to_timespec64() 82 .tv_sec = ts64.tv_sec, in timespec64_to_coda() 125 if (attr->va_atime.tv_sec != -1) in coda_vattr_to_iattr() 127 if (attr->va_mtime.tv_sec != -1) in coda_vattr_to_iattr() 129 if (attr->va_ctime.tv_sec != -1) in coda_vattr_to_iattr() 151 vattr->va_atime.tv_sec = (int64_t) -1; in coda_iattr_to_vattr() 153 vattr->va_mtime.tv_sec = (int64_t) -1; in coda_iattr_to_vattr() 155 vattr->va_ctime.tv_sec = (int64_t) -1; in coda_iattr_to_vattr()
|
/linux/tools/testing/selftests/mqueue/ |
A D | mq_perf_tests.c | 355 nsec = ((middle.tv_sec - start.tv_sec) * 1000000000) + \ 359 send_total.tv_sec++; \ 362 nsec = ((end.tv_sec - middle.tv_sec) * 1000000000) + \ 366 recv_total.tv_sec++; \ 454 send_total.tv_sec = 0; in perf_test_thread() 456 recv_total.tv_sec = 0; in perf_test_thread() 461 send_total.tv_sec, send_total.tv_nsec); in perf_test_thread() 476 send_total.tv_sec = 0; in perf_test_thread() 478 recv_total.tv_sec = 0; in perf_test_thread() 488 nsec = ((unsigned long long)(end.tv_sec - start.tv_sec) * in perf_test_thread() [all …]
|
/linux/tools/testing/selftests/kvm/ |
A D | dirty_log_perf_test.c | 69 vcpu_id, current_iteration, ts_diff.tv_sec, in vcpu_worker() 73 vcpu_id, current_iteration, ts_diff.tv_sec, in vcpu_worker() 84 total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec); in vcpu_worker() 223 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 230 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 250 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 258 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 267 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 276 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 284 p->iterations, get_dirty_log_total.tv_sec, in run_test() [all …]
|
/linux/arch/um/os-Linux/ |
A D | time.c | 23 return ((long long) tv->tv_sec * UM_NSEC_PER_SEC) + in timeval_to_ns() 29 return ((long long) ts->tv_sec * UM_NSEC_PER_SEC) + ts->tv_nsec; in timespec_to_ns() 57 its.it_value.tv_sec = nsecs / UM_NSEC_PER_SEC; in os_timer_set_interval() 60 its.it_interval.tv_sec = nsecs / UM_NSEC_PER_SEC; in os_timer_set_interval() 72 .it_value.tv_sec = nsecs / UM_NSEC_PER_SEC, in os_timer_one_shot() 75 .it_interval.tv_sec = 0, in os_timer_one_shot() 117 if (its.it_value.tv_sec || its.it_value.tv_nsec) in os_idle_sleep()
|
/linux/fs/ |
A D | utimes.c | 192 tstimes[0].tv_sec = times[0].tv_sec; in do_futimesat() 194 tstimes[1].tv_sec = times[1].tv_sec; in do_futimesat() 219 if (get_user(tv[0].tv_sec, ×->actime) || in SYSCALL_DEFINE2() 220 get_user(tv[1].tv_sec, ×->modtime)) in SYSCALL_DEFINE2() 241 if (get_user(tv[0].tv_sec, &t->actime) || in SYSCALL_DEFINE2() 242 get_user(tv[1].tv_sec, &t->modtime)) in SYSCALL_DEFINE2() 273 if (get_user(tv[0].tv_sec, &t[0].tv_sec) || in do_compat_futimesat() 275 get_user(tv[1].tv_sec, &t[1].tv_sec) || in do_compat_futimesat()
|
/linux/tools/testing/selftests/net/ |
A D | timestamping.c | 167 (long)now.tv_sec, (long)now.tv_usec, in printpacket() 184 (long)stamp->tv_sec, in printpacket() 192 (long)stamp->tv_sec, in printpacket() 201 (long)stamp->tv_sec, in printpacket() 207 (long)stamp->tv_sec, in printpacket() 264 (long)tv.tv_sec, in printpacket() 272 (long)ts.tv_sec, in printpacket() 498 next.tv_sec = (next.tv_sec + 1) / 5 * 5; in main() 508 delta_us = (long)(next.tv_sec - now.tv_sec) * 1000000 + in main() 512 delta.tv_sec = delta_us / 1000000; in main() [all …]
|
/linux/tools/testing/radix-tree/ |
A D | benchmark.c | 38 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_iter() 66 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_insert() 87 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_tagging() 108 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_delete()
|
/linux/sound/core/seq/ |
A D | seq_timer.h | 75 if (a->tv_sec > b->tv_sec) in snd_seq_compare_real_time() 77 if ((a->tv_sec == b->tv_sec) && (a->tv_nsec >= b->tv_nsec)) in snd_seq_compare_real_time() 88 tm->tv_sec++; in snd_seq_sanity_real_time() 96 tm->tv_sec += inc->tv_sec; in snd_seq_inc_real_time()
|
/linux/drivers/pps/generators/ |
A D | pps_gen_parport.c | 83 if (expire_time.tv_sec != ts1.tv_sec || ts1.tv_nsec > lim) { in hrtimer_event() 86 (s64)ts1.tv_sec, ts1.tv_nsec); in hrtimer_event() 93 } while (expire_time.tv_sec == ts2.tv_sec && ts2.tv_nsec < lim); in hrtimer_event() 103 } while (expire_time.tv_sec == ts2.tv_sec && ts2.tv_nsec < lim); in hrtimer_event() 133 ktime_set(expire_time.tv_sec + 1, in hrtimer_event() 173 return ktime_set(ts.tv_sec + in next_intr_time()
|
/linux/drivers/input/misc/ |
A D | hp_sdc_rtc.c | 195 res->tv_sec = (tenms / 100) + (time64_t)days * 86400; in hp_sdc_rtc_read_rt() 212 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_fhs() 229 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_mt() 246 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_dt() 263 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_ct() 291 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 298 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 305 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 312 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 319 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show()
|