Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

Clock Class Reference

Measures time intervals. More...

#include <cxxtools/clock.h>

List of all members.

Public Member Functions

 Clock ()
 Constructs a Clock.
 ~Clock ()
 Destructor.
void start ()
 Start the clock.
Timespan stop ()
 Stop the clock.

Static Public Member Functions

static DateTime getSystemTime ()
 Returns the system time.
static DateTime getLocalTime ()
 Returns the current local time.
static Timespan getSystemTicks ()
 Returns the timespan since a fixed point in the past.


Detailed Description

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

Member Function Documentation

Timespan stop (  ) 

Returns the elapsed time since start was called.

static Timespan getSystemTicks (  )  [static]

The getSystemTicks function retrieves the system ticks, in milliseconds. The system time is the time elapsed since i.e. the system was started, or the unix epoch or some other fixed point in the past.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6