Lines Matching +full:pre +full:- +full:programs

64 /// Calls setitimer(2) with exception-based error reporting.
81 if (::setitimer(ITIMER_REAL, &timeval, old_timeval) == -1) { in safe_setitimer()
103 /// sequentially to find either expired or expiring-now timers.
124 timers_set& timers = _all_timers[timer->when()]; in add_to_all_timers()
141 timer->when()); in remove_from_all_timers()
209 PRE(!(*iter).second.empty()); in reprogram_system_timer()
218 PRE(!(*iter).second.empty()); in reprogram_system_timer()
224 const datetime::delta delta = next - now; in reprogram_system_timer()
232 /// Programs the first timer.
243 _timer_activation(timer->when()) in global_state()
245 PRE(now < timer->when()); in global_state()
249 const datetime::delta delta = timer->when() - now; in global_state()
251 timer->when() % now); in global_state()
257 _timer_activation = timer->when(); in global_state()
274 if (::setitimer(ITIMER_REAL, &_old_timeval, NULL) == -1) { in ~global_state()
278 _sigalrm_programmer->unprogram(); in ~global_state()
282 /// Programs a new timer, possibly adjusting the global system timer.
315 LD(F("Unprogramming timer; previously firing on %s") % timer->when()); in unprogram()
359 PRE(signo == SIGALRM); in sigalrm_handler()
360 globals->fire(datetime::timestamp::now()); in sigalrm_handler()
373 timer->do_fired(); in invoke_do_fired()
379 /// We assume that there is a 1-1 mapping between timer objects and impl
414 /// Constructor; programs a run-once timer.
416 /// This programs the global timer and signal handler if this is the first timer
430 globals->program_new(this, now); in timer()
444 if (_pimpl->programmed) { in ~timer()
445 LW("Auto-destroying still-programmed signals::timer object"); in ~timer()
453 if (!_pimpl->fired) { in ~timer()
455 if (now > _pimpl->when) { in ~timer()
469 return _pimpl->when; in when()
480 PRE(!_pimpl->fired); in do_fired()
481 _pimpl->fired = true; in do_fired()
486 /// User-provided callback to run when the timer expires.
506 return _pimpl->fired; in fired()
512 /// \pre The timer is programmed (i.e. this can only be called once).
523 if (!_pimpl->programmed) { in unprogram()
527 LD("Called unprogram on already-unprogrammed timer; possibly just " in unprogram()
532 if (!globals->unprogram(this)) { in unprogram()
535 _pimpl->programmed = false; in unprogram()
539 if (!_pimpl->fired) { in unprogram()
541 if (now > _pimpl->when) { in unprogram()
543 _pimpl->when); in unprogram()