/Zephyr-latest/samples/posix/gettimeofday/src/ |
D | main.c | 18 struct timeval tv; in main() local 21 int res = gettimeofday(&tv, NULL); in main() 32 "tv_usec=%d\n\t%s\n", (unsigned int)(tv.tv_sec >> 32), in main() 33 (unsigned int)tv.tv_sec, (unsigned int)tv.tv_usec, in main()
|
/Zephyr-latest/boards/native/native_posix/ |
D | timer_model.c | 132 static inline void host_clock_gettime(struct timespec *tv) in host_clock_gettime() argument 135 clock_gettime(CLOCK_MONOTONIC_RAW, tv); in host_clock_gettime() 137 clock_gettime(CLOCK_MONOTONIC, tv); in host_clock_gettime() 143 struct timespec tv; in get_host_us_time() local 145 host_clock_gettime(&tv); in get_host_us_time() 146 return (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in get_host_us_time() 161 struct timespec tv; in hwtimer_init() local 164 clock_gettime(CLOCK_REALTIME, &tv); in hwtimer_init() 165 realhosttime = (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in hwtimer_init() 396 struct timespec tv; in hwtimer_get_pseudohost_rtc_time() local [all …]
|
/Zephyr-latest/scripts/native_simulator/native/src/ |
D | timer_model.c | 120 static inline void host_clock_gettime(struct timespec *tv) in host_clock_gettime() argument 123 clock_gettime(CLOCK_MONOTONIC_RAW, tv); in host_clock_gettime() 125 clock_gettime(CLOCK_MONOTONIC, tv); in host_clock_gettime() 136 struct timespec tv; in get_host_us_time() local 138 host_clock_gettime(&tv); in get_host_us_time() 139 return (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in get_host_us_time() 154 struct timespec tv; in hwtimer_init() local 157 clock_gettime(CLOCK_REALTIME, &tv); in hwtimer_init() 158 realhosttime = (uint64_t)tv.tv_sec * 1e6 + tv.tv_nsec / 1000; in hwtimer_init() 388 struct timespec tv; in hwtimer_get_pseudohost_rtc_time() local [all …]
|
/Zephyr-latest/samples/sensor/amg88xx/src/ |
D | main.c | 30 struct sensor_value *tv = ptr; in print_buffer() local 41 printk("%05d ", (tv[i].val1 * 100 + tv[i].val2 / 10000)); in print_buffer()
|
/Zephyr-latest/tests/posix/common/src/ |
D | clock.c | 36 static inline void tv_to_ts(const struct timeval *tv, struct timespec *ts) in tv_to_ts() argument 38 ts->tv_sec = tv->tv_sec; in tv_to_ts() 39 ts->tv_nsec = tv->tv_usec * NSEC_PER_USEC; in tv_to_ts() 94 struct timeval tv; in ZTEST() local 106 zassert_ok(gettimeofday(&tv, NULL)); in ZTEST() 113 tv_to_ts(&tv, &ts); in ZTEST()
|
/Zephyr-latest/include/zephyr/posix/sys/ |
D | time.h | 33 int gettimeofday(struct timeval *tv, void *tz);
|
/Zephyr-latest/lib/posix/options/ |
D | clock.c | 272 int gettimeofday(struct timeval *tv, void *tz) in gettimeofday() argument 282 tv->tv_sec = ts.tv_sec; in gettimeofday() 283 tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC; in gettimeofday()
|
/Zephyr-latest/drivers/net/ |
D | nsos_sockets.c | 1254 const struct zsock_timeval *tv = optval; in nsos_setsockopt() local 1263 nsos_mid_tv.tv_sec = tv->tv_sec; in nsos_setsockopt() 1264 nsos_mid_tv.tv_usec = tv->tv_usec; in nsos_setsockopt() 1274 if (tv->tv_sec == 0 && tv->tv_usec == 0) { in nsos_setsockopt() 1277 sock->recv_timeout = K_USEC(tv->tv_sec * 1000000LL + tv->tv_usec); in nsos_setsockopt() 1283 const struct zsock_timeval *tv = optval; in nsos_setsockopt() local 1292 nsos_mid_tv.tv_sec = tv->tv_sec; in nsos_setsockopt() 1293 nsos_mid_tv.tv_usec = tv->tv_usec; in nsos_setsockopt() 1303 if (tv->tv_sec == 0 && tv->tv_usec == 0) { in nsos_setsockopt() 1306 sock->send_timeout = K_USEC(tv->tv_sec * 1000000LL + tv->tv_usec); in nsos_setsockopt()
|
D | nsos_adapt.c | 771 struct timeval tv = { in nsos_adapt_setsockopt() local 778 &tv, sizeof(tv)); in nsos_adapt_setsockopt() 787 struct timeval tv = { in nsos_adapt_setsockopt() local 794 &tv, sizeof(tv)); in nsos_adapt_setsockopt()
|
/Zephyr-latest/samples/net/cellular_modem/src/ |
D | main.c | 148 const struct timeval tv = { .tv_sec = 10 }; in sample_echo_packet() local 150 if (zsock_setsockopt(socket_fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0) { in sample_echo_packet()
|
/Zephyr-latest/samples/drivers/counter/maxim_ds3231/src/ |
D | main.c | 22 struct tm tv; in format_time() local 23 struct tm *tp = gmtime_r(&time, &tv); in format_time()
|
/Zephyr-latest/subsys/net/lib/sockets/ |
D | sockets_inet.c | 2286 const struct zsock_timeval *tv = optval; in zsock_setsockopt_ctx() local 2294 if (tv->tv_sec == 0 && tv->tv_usec == 0) { in zsock_setsockopt_ctx() 2297 timeout = K_USEC(tv->tv_sec * 1000000ULL in zsock_setsockopt_ctx() 2298 + tv->tv_usec); in zsock_setsockopt_ctx() 2318 const struct zsock_timeval *tv = optval; in zsock_setsockopt_ctx() local 2326 if (tv->tv_sec == 0 && tv->tv_usec == 0) { in zsock_setsockopt_ctx() 2329 timeout = K_USEC(tv->tv_sec * 1000000ULL in zsock_setsockopt_ctx() 2330 + tv->tv_usec); in zsock_setsockopt_ctx()
|
/Zephyr-latest/subsys/fs/ |
D | fuse_fs_access.c | 407 static int fuse_fs_access_utimens(const char *path, const struct timespec tv[2]) in fuse_fs_access_utimens() 411 ARG_UNUSED(tv); in fuse_fs_access_utimens()
|
/Zephyr-latest/drivers/wifi/simplelink/ |
D | simplelink_sockets.c | 562 struct SlTimeval_t tv, *ptv; in simplelink_poll() local 577 tv.tv_sec = msecs / ONE_THOUSAND; in simplelink_poll() 578 tv.tv_usec = (msecs % ONE_THOUSAND) * ONE_THOUSAND; in simplelink_poll() 579 ptv = &tv; in simplelink_poll()
|
/Zephyr-latest/tests/net/socket/tcp/src/ |
D | main.c | 2236 struct timeval tv = { in ZTEST() local 2245 ret = zsock_select(fd + 1, NULL, &wfds, NULL, &tv); in ZTEST()
|