System clock. More...
#include <time.hpp>
Public Types | |
| typedef time_point | TimePoint |
| typedef duration | Duration |
System clock.
System clock represents the system-wide real time wall clock.
It may not be monotonic: on most systems, the system time can be adjusted at any moment. It is the only clock that has the ability to be displayed and converted to/from UNIX timestamp.
To get current TimePoint:
system_clock::TimePoint now = system_clock::now();
To convert TimePoint to/from UNIX timestamp:
system_clock::TimePoint time = ...; uint64_t timestampInMilliseconds = toUnixTimestamp(time).count(); system_clock::TimePoint time2 = fromUnixTimestamp(time::milliseconds(timestampInMilliseconds));
| typedef duration ndn::time::system_clock::Duration |
| typedef time_point ndn::time::system_clock::TimePoint |