#include <Pt/System/Clock.h>
Measures time intervals. More...
Inherits NonCopyable.
Public Member Functions | |
Clock () | |
Constructs a Clock. | |
~Clock () | |
Destructor. | |
void | start () |
Start the clock. | |
Timespan | stop () |
Stop the clock. More... | |
Static Public Member Functions | |
static DateTime | getLocalTime () |
Returns the current local time. | |
static Timespan | getSystemTicks () |
Returns the timespan since a fixed point in the past. More... | |
static DateTime | getSystemTime () |
Returns the system time. | |
The Clock class can be used like a stop-watch by calling start() and stop(). The latter method returns the elapsed time.
|
static |
This function retrieves the system ticks, which is the passed time since a fixed point in the past e.g. the system was started, or the unix epoch or some other fixed point in the past.