Lines Matching refs:tvp
384 struct timeval *tvp)
390 clock_secs_to_ymdhms(tvp->tv_sec, &dt_val);
393 if (tvp == NULL) {
394 tvp = &tv_val;
395 tvp->tv_sec = clock_ymdhms_to_secs(dt);
396 tvp->tv_usec = 0;
404 dt->dt_wday, (unsigned)tvp->tv_sec, (unsigned)tvp->tv_usec);
407 #define todr_debug(prefix, rv, dt, tvp)
436 todr_gettime(todr_chip_handle_t tch, struct timeval *tvp)
447 rv = tch->todr_gettime(tch, tvp);
454 tvp->tv_sec += rtc_offset * 60;
455 todr_debug("TODR-GET-SECS", rv, NULL, tvp);
485 tvp->tv_sec = clock_ymdhms_to_secs(&dt) + rtc_offset * 60;
486 tvp->tv_usec = 0;
487 return tvp->tv_sec < 0 ? EINVAL : 0;
494 todr_settime(todr_chip_handle_t tch, struct timeval *tvp)
499 struct timeval copy = *tvp;
504 todr_debug("TODR-SET-SECS", rv, NULL, tvp);
508 time_t sec = tvp->tv_sec - rtc_offset * 60;
509 if (tvp->tv_usec >= 500000)