Lines Matching refs:timer

29 #include "utils/signals/timer.hpp"
56 /// A timer that inserts an element into a vector on activation.
57 class delayed_inserter : public signals::timer {
75 /// \param delta Time to the timer activation.
80 signals::timer(delta), _destination(destination), _item(item)
97 wait_timers(const std::vector< signals::timer* >& timers)
102 for (std::vector< signals::timer* >::const_iterator
104 const signals::timer* timer = *iter;
105 if (timer->fired())
127 signals::timer timer(datetime::delta(1, 0));
128 ATF_REQUIRE(!timer.fired());
129 while (!timer.fired())
141 signals::timer timer(datetime::delta(0, 500000));
142 ATF_REQUIRE(!timer.fired());
143 while (!timer.fired())
157 std::vector< signals::timer* > timers;
183 std::vector< signals::timer* > timers;
186 // First timer with an activation in the future.
224 std::vector< signals::timer* > timers;
227 // First timer with an activation in the future.
243 // Cancel the first timer to reprogram next activation.
246 // Cancel another timer without reprogramming next activation.
265 std::vector< signals::timer* > timers;
271 // First timer with an activation in the future.
316 delayed_inserter* timer = new delayed_inserter(
320 // timer before it was destroyed. However, the handler should run
322 timer->unprogram();
323 delete timer;
345 // All constructed timers are now dead, so the interval timer should have
367 signals::timer timer(datetime::delta(0, 500000));
368 timer.unprogram();
370 ATF_REQUIRE(!timer.fired());
378 "timer and the global state are programmed is correct; do so "
379 "by setting an extremely small delay for the timer hoping that "
390 signals::timer timer(datetime::delta(0, 1));
404 if (timer.fired())
406 timer.unprogram();