added Clock::raw(); style fixes

This commit is contained in:
Guenter Obiltschnig 2014-10-08 07:59:48 +02:00
parent 9ee4d0a36b
commit ef34c21e91
2 changed files with 19 additions and 3 deletions

View File

@ -86,6 +86,13 @@ public:
/// Returns the clock value expressed in microseconds /// Returns the clock value expressed in microseconds
/// since the system-specific epoch time (usually system /// since the system-specific epoch time (usually system
/// startup). /// startup).
ClockVal raw() const;
/// Returns the clock value expressed in microseconds
/// since the system-specific epoch time (usually system
/// startup).
///
/// Same as microseconds().
ClockDiff elapsed() const; ClockDiff elapsed() const;
/// Returns the time elapsed since the time denoted by /// Returns the time elapsed since the time denoted by
@ -215,6 +222,12 @@ inline void swap(Clock& s1, Clock& s2)
} }
inline Clock::ClockVal Clock::raw() const
{
return _clock;
}
} // namespace Poco } // namespace Poco

View File

@ -107,8 +107,10 @@ public:
/// Returns true iff the given interval has passed /// Returns true iff the given interval has passed
/// since the time denoted by the timestamp. /// since the time denoted by the timestamp.
TimeVal raw() const; TimeVal raw() const;
/// Returns the raw time value. /// Returns the raw time value.
///
/// Same as epochMicroseconds().
static Timestamp fromEpochTime(std::time_t t); static Timestamp fromEpochTime(std::time_t t);
/// Creates a timestamp from a std::time_t. /// Creates a timestamp from a std::time_t.
@ -246,9 +248,10 @@ inline void swap(Timestamp& s1, Timestamp& s2)
s1.swap(s2); s1.swap(s2);
} }
inline Timestamp::TimeVal Timestamp::raw() const inline Timestamp::TimeVal Timestamp::raw() const
{ {
return _ts; return _ts;
} }