Clock Class Reference

#include <Pt/System/Clock.h>

Measures time intervals. More...

Inherits NonCopyable.

Public Member Functions

 Clock ()
 Constructs a Clock.
 ~Clock ()
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.

Detailed Description

The Clock class can be used like a stop-watch by calling start() and stop(). The latter method returns the elapsed time.

Member Function Documentation

Timespan stop ( )

Returns the elapsed time since start() was called.

static Timespan getSystemTicks ( )

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.