Home
last modified time | relevance | path

Searched refs:tv (Results 1 – 16 of 16) sorted by relevance

/components/drivers/rtc/
A Ddev_soft_rtc.c119 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 Ddev_rtc.c286 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 Dclnt_generic.c58 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 Dboottime.c15 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 Dhwtimer.c36 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 Dbsd_porting.h524 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 Ddev_rtc.h117 rt_err_t (*get_timeval)(struct timeval *tv);
118 rt_err_t (*set_timeval)(struct timeval *tv);
/components/libc/compilers/common/
A Dctime.c467 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 Ddemand.c326 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 Ddemand.c326 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 Dtime.h108 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 Dsockets_stresstest.c183 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 Dktime.h43 rt_err_t rt_ktime_boottime_get_us(struct timeval *tv);
/components/net/lwip/lwip-2.1.2/test/unit/api/
A Dtest_sockets.c660 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 Dlwp_syscall.h62 sysret_t sys_settimeofday(const struct timeval *tv, const struct timezone *tzp);
A Dlwp_syscall.c1272 sysret_t sys_settimeofday(const struct timeval *tv, const struct timezone *tzp) in sys_settimeofday() argument

Completed in 38 milliseconds