X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FClockService.hh;h=6067cec322114c565e16421eea6a634d442c1dc1;hb=04181eba2e5e1dd0a8552b69905d7a3d493e2d77;hp=02082ea057fcd0514a17854c7134eced102b9d26;hpb=412024ed31a4ab4eaea7a4165a434f8efebee325;p=senf.git diff --git a/Scheduler/ClockService.hh b/Scheduler/ClockService.hh index 02082ea..6067cec 100644 --- a/Scheduler/ClockService.hh +++ b/Scheduler/ClockService.hh @@ -86,6 +86,12 @@ namespace senf { */ typedef boost::posix_time::ptime abstime_type; + /** \brief Relative time data type + + Boost.DateTime datatype used to represent time intervals + */ + typedef boost::posix_time::time_duration reltime_type; + /////////////////////////////////////////////////////////////////////////// static clock_type now(); ///< Return current clock value @@ -98,6 +104,12 @@ namespace senf { monotonous, absolute time may be non-monotonous if the system date/time is changed. */ + static reltime_type reltime(clock_type clock); ///< Convert clock to relative time + /**< This member converts a clock value into a relative + Boost.DateTime time interval + \note The resolution of reltime_type might be smaller + than the clock_type resolution */ + static clock_type clock(abstime_type time); ///< Convert absolute time to clock value /**< This member converst an absolute time value into the corresponding clock value.