| /components/drivers/rtc/ |
| A D | dev_soft_rtc.c | 119 struct timeval *tv = (struct timeval *)args; in soft_rtc_control() local 121 tv->tv_sec = init_time + _tv.tv_sec; in soft_rtc_control() 122 tv->tv_usec = init_tv.tv_usec + _tv.tv_usec; in soft_rtc_control() 128 struct timeval *tv = (struct timeval *)args; in soft_rtc_control() local 130 set_rtc_time(tv->tv_sec); in soft_rtc_control() 131 init_tv.tv_usec = tv->tv_usec - _tv.tv_usec; in soft_rtc_control() 162 struct timeval *tv = (struct timeval *)args; in soft_rtc_control() local 172 set_rtc_time(tv->tv_sec); in soft_rtc_control() 287 struct timeval tv = {0}; in cmd_rtc_sync() local 293 gettimeofday(&tv, &tz); in cmd_rtc_sync() [all …]
|
| A D | dev_rtc.c | 286 struct timeval tv = { 0 }; in date() local 294 gettimeofday(&tv, RT_NULL); in date() 295 now = tv.tv_sec; in date() 300 rt_kprintf("timestamps: %ld\n", (long)tv.tv_sec); in date()
|
| /components/dfs/dfs_v1/filesystems/nfs/rpc/ |
| A D | clnt_generic.c | 58 struct timeval tv; in clnt_create() local 76 tv.tv_sec = 5; in clnt_create() 77 tv.tv_usec = 0; in clnt_create() 78 client = clntudp_create(&server, prog, vers, tv, &sock); in clnt_create() 80 tv.tv_sec = 1; in clnt_create() 81 clnt_control(client, CLSET_TIMEOUT, (char *)&tv); in clnt_create()
|
| /components/drivers/ktime/src/ |
| A D | boottime.c | 15 rt_weak rt_err_t rt_ktime_boottime_get_us(struct timeval *tv) in rt_ktime_boottime_get_us() argument 17 RT_ASSERT(tv != RT_NULL); in rt_ktime_boottime_get_us() 21 tv->tv_sec = ns / (1000ULL * 1000 * 1000); in rt_ktime_boottime_get_us() 22 tv->tv_usec = (ns % (1000ULL * 1000 * 1000)) / 1000; in rt_ktime_boottime_get_us()
|
| /components/drivers/hwtimer/ |
| A D | hwtimer.c | 36 rt_inline rt_uint32_t timeout_calc(rt_hwtimer_t *timer, rt_hwtimerval_t *tv) in timeout_calc() argument 48 tv_sec = tv->sec + tv->usec/(float)1000000; in timeout_calc() 167 rt_hwtimerval_t tv; in rt_hwtimer_read() local 192 tv.sec = (rt_int32_t)t; in rt_hwtimer_read() 193 tv.usec = (rt_int32_t)((t - tv.sec) * 1000000); in rt_hwtimer_read() 194 size = size > sizeof(tv)? sizeof(tv) : size; in rt_hwtimer_read() 195 rt_memcpy(buffer, &tv, size); in rt_hwtimer_read()
|
| /components/lwp/terminal/ |
| A D | bsd_porting.h | 524 rt_inline void timevalfix(struct timeval *tv) in timevalfix() argument 526 if (tv->tv_usec < 0) in timevalfix() 528 tv->tv_sec--; in timevalfix() 529 tv->tv_usec += 1000000; in timevalfix() 531 if (tv->tv_usec >= 1000000) in timevalfix() 533 tv->tv_sec++; in timevalfix() 534 tv->tv_usec -= 1000000; in timevalfix() 552 rt_inline rt_tick_t tvtohz(struct timeval *tv) in tvtohz() argument 555 rc = tv->tv_sec * RT_TICK_PER_SECOND; in tvtohz() 556 rc += tv->tv_usec * RT_TICK_PER_SECOND / MICROSECOND_PER_SECOND; in tvtohz()
|
| /components/drivers/include/drivers/ |
| A D | dev_rtc.h | 117 rt_err_t (*get_timeval)(struct timeval *tv); 118 rt_err_t (*set_timeval)(struct timeval *tv);
|
| /components/libc/compilers/common/ |
| A D | ctime.c | 467 int gettimeofday(struct timeval *tv, struct timezone *tz) in gettimeofday() argument 485 if (tv != RT_NULL) in gettimeofday() 487 tv->tv_sec = 0; in gettimeofday() 488 tv->tv_usec = 0; in gettimeofday() 490 if (_control_rtc(RT_DEVICE_CTRL_RTC_GET_TIMEVAL, tv) == RT_EOK) in gettimeofday() 496 if (_control_rtc(RT_DEVICE_CTRL_RTC_GET_TIME, (void *)&tv->tv_sec) == RT_EOK) in gettimeofday() 509 int settimeofday(const struct timeval *tv, const struct timezone *tz) in settimeofday() argument 517 if (tv != RT_NULL && (long)tv->tv_usec >= 0 && (long)tv->tv_sec >= 0) in settimeofday() 519 if (_control_rtc(RT_DEVICE_CTRL_RTC_SET_TIMEVAL, (void *)tv) == RT_EOK) in settimeofday() 525 if (_control_rtc(RT_DEVICE_CTRL_RTC_SET_TIME, (void *)&tv->tv_sec) == RT_EOK) in settimeofday()
|
| /components/net/lwip/lwip-2.1.2/src/netif/ppp/ |
| A D | demand.c | 326 struct timeval tv; local 333 tv.tv_sec = 1; 334 tv.tv_usec = 0; 335 select(0,NULL,NULL,NULL,&tv); /* Sleep for 1 Seconds */
|
| /components/net/lwip/lwip-2.0.3/src/netif/ppp/ |
| A D | demand.c | 326 struct timeval tv; local 333 tv.tv_sec = 1; 334 tv.tv_usec = 0; 335 select(0,NULL,NULL,NULL,&tv); /* Sleep for 1 Seconds */
|
| /components/libc/compilers/common/include/sys/ |
| A D | time.h | 108 int gettimeofday(struct timeval *tv, struct timezone *tz); 109 int settimeofday(const struct timeval *tv, const struct timezone *tz);
|
| /components/net/lwip/lwip-2.1.2/test/sockets/ |
| A D | sockets_stresstest.c | 183 struct timeval tv; in sockets_stresstest_wait_readable_select() local 195 tv.tv_sec = timeout_ms / 1000; in sockets_stresstest_wait_readable_select() 196 tv.tv_usec = (timeout_ms - (tv.tv_sec * 1000)) * 1000; in sockets_stresstest_wait_readable_select() 197 ret = lwip_select(s + 1, &fs_r, &fs_w, &fs_e, &tv); in sockets_stresstest_wait_readable_select()
|
| /components/drivers/ktime/inc/ |
| A D | ktime.h | 43 rt_err_t rt_ktime_boottime_get_us(struct timeval *tv);
|
| /components/net/lwip/lwip-2.1.2/test/unit/api/ |
| A D | test_sockets.c | 660 struct timeval tv; in START_TEST() local 675 tv.tv_sec = tv.tv_usec = 0; in START_TEST() 676 ret = lwip_select(s + 1, &readset, &writeset, &errset, &tv); in START_TEST()
|
| /components/lwp/ |
| A D | lwp_syscall.h | 62 sysret_t sys_settimeofday(const struct timeval *tv, const struct timezone *tzp);
|
| A D | lwp_syscall.c | 1272 sysret_t sys_settimeofday(const struct timeval *tv, const struct timezone *tzp) in sys_settimeofday() argument
|