Lines Matching refs:now

513 	time_t		now;  in alarm_handler()  local
516 now = time(NULL); in alarm_handler()
518 if (checkidle_time <= now && checkidle_time != 0) in alarm_handler()
519 check_idleness(&now, &hr_now); in alarm_handler()
520 if (shutdown_time <= now && shutdown_time != 0) in alarm_handler()
521 check_shutdown(&now, &hr_now); in alarm_handler()
523 set_alarm(now); in alarm_handler()
530 time_t now; in work_handler() local
602 now = last_resume = time(NULL); in work_handler()
604 check_idleness(&now, &hr_now); in work_handler()
605 check_shutdown(&now, &hr_now); in work_handler()
606 set_alarm(now); in work_handler()
610 check_shutdown(time_t *now, hrtime_t *hr_now) in check_shutdown() argument
628 (void) localtime_r(now, &tmp_time); in check_shutdown()
635 if ((s < f && *now >= s && *now < f) || in check_shutdown()
636 (s >= f && (*now < f || *now >= s))) { in check_shutdown()
711 if (is_ok2shutdown(now)) { in check_shutdown()
720 wakeup_time = (*now < f) ? f : in check_shutdown()
726 if ((wakeup_time - *now) < 180) { in check_shutdown()
730 shutdown_time = *now + 180; in check_shutdown()
754 (void) time(now); in check_shutdown()
756 shutdown_time = *now + in check_shutdown()
761 shutdown_time = *now + 300; in check_shutdown()
764 shutdown_time = *now + next_time; in check_shutdown()
765 } else if (s < f && *now >= f) { in check_shutdown()
772 is_ok2shutdown(time_t *now) in is_ok2shutdown() argument
828 if (life_began > *now) { in is_ok2shutdown()
841 life_passed = *now - life_began; in is_ok2shutdown()
876 check_idleness(time_t *now, hrtime_t *hr_now) in check_idleness() argument
904 checkidle_time = *now + IDLECHK_INTERVAL; in check_idleness()
976 set_alarm(time_t now) in set_alarm() argument
989 next_alarm = (next_time <= now) ? 1 : (next_time - now); in set_alarm()
993 (void) fprintf(stderr, "Currently @ %s", ctime(&now)); in set_alarm()
994 (void) fprintf(stderr, "Checkidle in %d secs\n", checkidle_time - now); in set_alarm()
995 (void) fprintf(stderr, "Shutdown in %d secs\n", shutdown_time - now); in set_alarm()