/Zephyr-Core-3.6.0/tests/posix/common/src/ |
D | nanosleep.c | 51 zassert_equal(rem.tv_sec, 0, "actual: %d expected: %d", rem.tv_sec, 0); in common_errors() 56 req = (struct timespec){.tv_sec = -1, .tv_nsec = 0}; in common_errors() 61 req = (struct timespec){.tv_sec = 0, .tv_nsec = -1}; in common_errors() 66 req = (struct timespec){.tv_sec = -1, .tv_nsec = -1}; in common_errors() 72 req = (struct timespec){.tv_sec = 0, .tv_nsec = 1000000000}; in common_errors() 82 req = (struct timespec){.tv_sec = 1, .tv_nsec = 1}; in common_errors() 85 zassert_equal(req.tv_sec, 1); in common_errors() 91 zassert_equal(rem.tv_sec, 0, "actual: %d expected: %d", rem.tv_sec, 0); in common_errors() 100 req = (struct timespec){.tv_sec = 0, .tv_nsec = 1}; in common_errors() 103 zassert_equal(req.tv_sec, 0, "actual: %d expected: %d", req.tv_sec, 0); in common_errors() [all …]
|
D | timer.c | 48 value.it_value.tv_sec = DURATION_SECS; in test_timer() 50 value.it_interval.tv_sec = PERIOD_SECS; in test_timer() 57 LOG_DBG("Timer fires every %d secs and %d nsecs", (int)value.it_interval.tv_sec, in test_timer() 59 LOG_DBG("Time remaining to fire %d secs and %d nsecs", (int)value.it_value.tv_sec, in test_timer() 67 secs_elapsed = te.tv_sec - ts.tv_sec; in test_timer() 71 secs_elapsed = (te.tv_sec - ts.tv_sec - 1); in test_timer() 75 uint64_t first_sig = value.it_value.tv_sec * NSEC_PER_SEC + value.it_value.tv_nsec; in test_timer() 76 uint64_t sig_interval = value.it_interval.tv_sec * NSEC_PER_SEC + value.it_interval.tv_nsec; in test_timer() 115 value.it_interval.tv_sec = 0; in ZTEST() 117 value.it_value.tv_sec = 0; in ZTEST()
|
D | clock.c | 33 return ts->tv_sec * NSEC_PER_SEC + ts->tv_nsec; in ts_to_ns() 38 ts->tv_sec = tv->tv_sec; in tv_to_ts() 87 zassert_not_equal(ts.tv_sec, -1); in ZTEST()
|
/Zephyr-Core-3.6.0/lib/posix/options/ |
D | clock.c | 36 base->tv_sec = 0; in z_impl___posix_clock_get_base() 69 base.tv_sec = 0; in clock_gettime() 86 ts->tv_sec = (time_t) elapsed_secs; in clock_gettime() 90 ts->tv_sec += base.tv_sec; in clock_gettime() 93 ts->tv_sec++; in clock_gettime() 124 int64_t delta = (int64_t)NSEC_PER_SEC * tp->tv_sec + tp->tv_nsec in clock_settime() 127 base.tv_sec = delta / NSEC_PER_SEC; in clock_settime() 162 if (rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 || rqtp->tv_nsec >= NSEC_PER_SEC) { in clock_nanosleep() 168 unlikely(rqtp->tv_sec >= ULLONG_MAX / NSEC_PER_SEC)) { in clock_nanosleep() 171 + k_sleep(K_SECONDS(rqtp->tv_sec - 1)) * NSEC_PER_MSEC; in clock_nanosleep() [all …]
|
D | _common.c | 22 secs = abstime->tv_sec - curtime.tv_sec; in timespec_to_timeoutms()
|
D | timer.c | 219 its->it_value.tv_sec = (int32_t) secs; in timer_gettime() 223 its->it_value.tv_sec = 0; in timer_gettime() 258 if ((value->it_value.tv_sec == 0) && (value->it_value.tv_nsec == 0)) { in timer_settime() 269 timer->interval.tv_sec = value->it_interval.tv_sec; in timer_settime()
|
/Zephyr-Core-3.6.0/samples/drivers/counter/maxim_ds3231/src/ |
D | main.c | 73 amb->tv_sec = a->tv_sec - b->tv_sec; in timespec_subtract() 76 amb->tv_sec = a->tv_sec - b->tv_sec - 1; in timespec_subtract() 90 apb->tv_sec = a->tv_sec + b->tv_sec; in timespec_add() 92 apb->tv_sec += 1; in timespec_add() 122 uint32_t offset_s = time - (uint32_t)sp.rtc.tv_sec; in min_alarm_handler() 126 adj.tv_sec = offset_syncclock / syncclock_Hz; in min_alarm_handler() 136 ts->tv_sec += adj.tv_sec; in min_alarm_handler() 139 ts->tv_sec += 1; in min_alarm_handler() 145 (uint32_t)(ts->tv_sec - time), ts->tv_nsec, in min_alarm_handler() 193 .tv_sec = align_hour, in set_aligned_clock() [all …]
|
/Zephyr-Core-3.6.0/lib/libc/common/source/time/ |
D | time.c | 24 *tloc = ts.tv_sec; in time() 27 return ts.tv_sec; in time()
|
/Zephyr-Core-3.6.0/samples/posix/gettimeofday/src/ |
D | main.c | 30 "tv_usec=%d\n\t%s\n", (unsigned int)(tv.tv_sec >> 32), in main() 31 (unsigned int)tv.tv_sec, (unsigned int)tv.tv_usec, in main()
|
/Zephyr-Core-3.6.0/include/zephyr/posix/sys/ |
D | stat.h | 113 #define st_atime st_atim.tv_sec /* Backward compatibility */ 114 #define st_mtime st_mtim.tv_sec 115 #define st_ctime st_ctim.tv_sec 147 #define st_atime st_atim.tv_sec 148 #define st_ctime st_ctim.tv_sec 149 #define st_mtime st_mtim.tv_sec
|
D | time.h | 19 time_t tv_sec; member
|
/Zephyr-Core-3.6.0/tests/net/socket/select/src/ |
D | main.c | 95 tval.tv_sec = tval.tv_usec = 0; in ZTEST_USER() 112 tval.tv_sec = 0; in ZTEST_USER() 127 tval.tv_sec = 0; in ZTEST_USER() 145 tval.tv_sec = tval.tv_usec = 0; in ZTEST_USER() 159 tval.tv_sec = tval.tv_usec = 0; in ZTEST_USER()
|
/Zephyr-Core-3.6.0/subsys/shell/modules/ |
D | date_service.c | 153 gmtime_r(&tp.tv_sec, &tm); in cmd_date_set() 177 tp.tv_sec = timeutil_timegm(&tm); in cmd_date_set() 178 if (tp.tv_sec == -1) { in cmd_date_set() 202 gmtime_r(&tp.tv_sec, &tm); in cmd_date_get()
|
/Zephyr-Core-3.6.0/include/zephyr/posix/ |
D | time.h | 33 time_t tv_sec; member 86 return (to->tv_sec * MSEC_PER_SEC) + (to->tv_nsec / NSEC_PER_MSEC); in _ts_to_ms()
|
/Zephyr-Core-3.6.0/lib/libc/armstdc/include/sys/ |
D | _timespec.h | 13 time_t tv_sec; member
|
D | _timeval.h | 23 time_t tv_sec; member
|
/Zephyr-Core-3.6.0/boards/posix/native_posix/ |
D | timer_model.c | 146 return (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in get_host_us_time() 165 realhosttime = (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in hwtimer_init() 212 requested_time.tv_sec = diff / 1e6; in hwtimer_tick_timer_reached() 214 requested_time.tv_sec*1e6)*1e3; in hwtimer_tick_timer_reached() 400 uint64_t rt_us = (uint64_t)tv.tv_sec * 1000000ULL + tv.tv_nsec / 1000; in hwtimer_get_pseudohost_rtc_time()
|
/Zephyr-Core-3.6.0/lib/libc/minimal/include/sys/ |
D | _timespec.h | 23 time_t tv_sec; member
|
D | _timeval.h | 23 time_t tv_sec; member
|
/Zephyr-Core-3.6.0/include/zephyr/net/ |
D | socket_types.h | 30 time_t tv_sec; member
|
/Zephyr-Core-3.6.0/tests/posix/headers/src/ |
D | sys_time_h.c | 22 zassert_not_equal(-1, offsetof(struct timeval, tv_sec)); in ZTEST()
|
/Zephyr-Core-3.6.0/scripts/native_simulator/native/src/ |
D | timer_model.c | 139 return (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in get_host_us_time() 158 realhosttime = (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in hwtimer_init() 202 requested_time.tv_sec = diff / 1e6; in hwtimer_tick_timer_reached() 204 requested_time.tv_sec*1e6)*1e3; in hwtimer_tick_timer_reached() 392 uint64_t rt_us = (uint64_t)tv.tv_sec * 1000000ULL + tv.tv_nsec / 1000; in hwtimer_get_pseudohost_rtc_time()
|
/Zephyr-Core-3.6.0/drivers/ethernet/ |
D | eth_native_posix_adapt.c | 104 timeout.tv_sec = 0; in eth_wait_data() 129 *second = (uint64_t)tp.tv_sec; in eth_clock_gettime()
|
/Zephyr-Core-3.6.0/tests/lib/c_lib/thrd/src/ |
D | thrd.h | 27 ts->tv_sec += oflow; in timespec_add_ms()
|
/Zephyr-Core-3.6.0/subsys/net/lib/config/ |
D | init_clock_sntp.c | 26 tspec.tv_sec = ts.seconds; in net_init_clock_via_sntp()
|