Lines Matching refs:now

505 	time_t		now;  in alarm_handler()  local
508 now = time(NULL); in alarm_handler()
510 if (checkidle_time <= now && checkidle_time != 0) in alarm_handler()
511 check_idleness(&now, &hr_now); in alarm_handler()
512 if (shutdown_time <= now && shutdown_time != 0) in alarm_handler()
513 check_shutdown(&now, &hr_now); in alarm_handler()
515 set_alarm(now); in alarm_handler()
522 time_t now; in work_handler() local
594 now = last_resume = time(NULL); in work_handler()
596 check_idleness(&now, &hr_now); in work_handler()
597 check_shutdown(&now, &hr_now); in work_handler()
598 set_alarm(now); in work_handler()
602 check_shutdown(time_t *now, hrtime_t *hr_now) in check_shutdown() argument
620 (void) localtime_r(now, &tmp_time); in check_shutdown()
627 if ((s < f && *now >= s && *now < f) || in check_shutdown()
628 (s >= f && (*now < f || *now >= s))) { in check_shutdown()
703 if (is_ok2shutdown(now)) { in check_shutdown()
712 wakeup_time = (*now < f) ? f : in check_shutdown()
718 if ((wakeup_time - *now) < 180) { in check_shutdown()
722 shutdown_time = *now + 180; in check_shutdown()
746 (void) time(now); in check_shutdown()
748 shutdown_time = *now + in check_shutdown()
753 shutdown_time = *now + 300; in check_shutdown()
756 shutdown_time = *now + next_time; in check_shutdown()
757 } else if (s < f && *now >= f) { in check_shutdown()
764 is_ok2shutdown(time_t *now) in is_ok2shutdown() argument
820 if (life_began > *now) { in is_ok2shutdown()
833 life_passed = *now - life_began; in is_ok2shutdown()
868 check_idleness(time_t *now, hrtime_t *hr_now) in check_idleness() argument
896 checkidle_time = *now + IDLECHK_INTERVAL; in check_idleness()
968 set_alarm(time_t now) in set_alarm() argument
981 next_alarm = (next_time <= now) ? 1 : (next_time - now); in set_alarm()
985 (void) fprintf(stderr, "Currently @ %s", ctime(&now)); in set_alarm()
986 (void) fprintf(stderr, "Checkidle in %d secs\n", checkidle_time - now); in set_alarm()
987 (void) fprintf(stderr, "Shutdown in %d secs\n", shutdown_time - now); in set_alarm()