Go to the documentation of this file.
10 #include <boost/date_time.hpp>
17 typedef boost::posix_time::ptime
Time;
18 typedef boost::posix_time::time_duration Duration;
27 return boost::posix_time::second_clock::local_time();
38 return boost::posix_time::second_clock::local_time() + boost::posix_time::time_duration(0, 0, offset, 0);
49 return boost::posix_time::time_from_string(
timestamp);
72 return boost::posix_time::to_simple_string(
time);
bool isOlder(const Time &time, const int offset)
Check whether the time object is older than a given number of seconds.
Definition: Timestamp.hpp:59
std::string timestamp(const Time &time)
Retrieve a timestamp string for the specified time.
Definition: Timestamp.hpp:70
Time time(const std::string ×tamp)
Get a time object from a formatted timestamp string.
Definition: Timestamp.hpp:47
Time time()
Get the current time.
Definition: Timestamp.hpp:25
boost::posix_time::ptime Time
Data structure to jold time and date information.
Definition: Timestamp.hpp:17