X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FTimerEvent.hh;h=6084f11465a663bee1e8f4214e97a5e76b245dc7;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=cb5e17fe64a16f6fad504c1c6c4287a6f55a8415;hpb=412024ed31a4ab4eaea7a4165a434f8efebee325;p=senf.git diff --git a/Scheduler/TimerEvent.hh b/Scheduler/TimerEvent.hh index cb5e17f..6084f11 100644 --- a/Scheduler/TimerEvent.hh +++ b/Scheduler/TimerEvent.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2008 +// Copyright (C) 2008 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund @@ -55,7 +55,7 @@ namespace scheduler { Timer events are implemented using POSIX timers. Depending on kernel features, the timer resolution will be far more precise than the linux clock tick resolution. The nominal timer resolution is 1 nanosecond. - + The timeout time is set as \e absolute time as returned by the senf::ClockService. After expiration, the timer will be disabled. It may be re-enabled by setting a new timeout time. It is also possible to change a running timer resetting the timeout time. @@ -89,13 +89,15 @@ namespace scheduler { \param[in] name Descriptive timer name (purely informational) \param[in] cb Callback to call + \param[in] timeout timeout time after the timer + will be disabled \param[in] initiallyEnabled if set \c false, do not enable callback automatically. */ TimerEvent(std::string const & name, Callback const & cb); ///< Create a timer event /**< Creates a timer event for callback \a cb. The timer is initially disabled. Use the timeout() member to set the - timeout time. + timeout time. \param[in] name Descriptive timer name (purely informational) \param[in] cb Callback to call. */ @@ -113,6 +115,8 @@ namespace scheduler { /**< \param[in] timeout new timeout time \param[in] initiallyEnabled if set \c false, do not enable callback automatically. */ + ClockService::clock_type timeout() const; + ///< Get current/last timeout value private: virtual void v_run();