+ /**
+ * Deconstruct a timer. This will automagically invalidate the timer,
+ * so it will not expire or fire an event.
+ */
+ ~timer();
+
+ /**
+ * Initialize a timer with a scheduled time. If the timer is already
+ * scheduled, its prior schedule will be invalidated and replaced by
+ * this new schedule.
+ * \param function The event handler.
+ * \param seconds The number of seconds; the meaning of this depends on
+ * the mode of the timer.
+ * \param mode The timer mode. If the mode is relative (default), the
+ * seconds parameter is the number of seconds from the current time to
+ * wait before expiring the timer. If the mode is absolute, the
+ * seconds parameter is the number of seconds from some arbitrary,
+ * fixed time in the past. If the mode is repeat, the seconds
+ * parameter is the number of seconds from now to wait before expiring
+ * the timer, at which time the timer will be rescheduled to expired
+ * again at that many seconds from the expiration time. A repeating
+ * timer can be invalidated manually using invalidate().
+ */
+ void init(const function& function,
+ scalar seconds,
+ enum mode mode = relative,
+ timer_source& source = default_source());
+
+ /**
+ * Manually invalidated the timer, removing any schedule such that the
+ * timer will not expired and no event will be fired.
+ */
+ void invalidate();
+
+ enum mode mode() const