If you can read this text, it means you are not experiencing this website at its best. This website is designed for used with a standards-compliant browser.
Current version: 2.3.2
ZThreads
A platform-independent, multi-threading and synchronization library for C++
Home Documentation Downloads CVS Contact
Time Class Reference

#include <Time.h>

Public Member Functions

 Time ()
 
 Time (const Time &t)
 
unsigned long milliseconds () const
 
unsigned long seconds () const
 
const Timeoperator+= (unsigned long millis)
 
const Timeoperator-= (unsigned long millis)
 
const Timeoperator+= (const Time &t)
 
const Timeoperator-= (const Time &t)
 

Detailed Description

Author
Eric Crahen http://www.code-foo.com
Date
<2003-07-16T17:52:46-0400>
Version
2.2.11

The Time class provides access to time values relative to when the program was started. In other words, this class might be thought of as a timer that starts at 0 and counts upwards. This class offers millisecond resolution.

Constructor & Destructor Documentation

◆ Time() [1/2]

Time ( )

Create a Time object with the current time relative to the beginning of the program.

◆ Time() [2/2]

Time ( const Time t)
inline

Create a Time object by copying another.

Parameters
t- Time object to copy.

Member Function Documentation

◆ milliseconds()

unsigned long milliseconds ( ) const
inline

Get the number of milliseconds in this Time object.

Returns
unsigned long milliseconds value

◆ operator+=() [1/2]

const Time & operator+= ( const Time t)
inline

Add the value of another Time object to this one.

Parameters
t- Time object whose value should be added to this object
Returns
const Time& this object

◆ operator+=() [2/2]

const Time & operator+= ( unsigned long  millis)
inline

Add some number of milliseconds to this Time object.

Parameters
millis- number of milliseconds to add to this Time object
Returns
const Time& this object

◆ operator-=() [1/2]

const Time & operator-= ( const Time t)
inline

Subtract the value of another Time object from this one. This function has a floor of 0.

Parameters
t- Time object whose value should be subtracted from this object
Returns
const Time& this object

◆ operator-=() [2/2]

const Time & operator-= ( unsigned long  millis)
inline

Subtract some number of milliseconds to this Time object.

Parameters
millis- number of milliseconds to subtract from this Time object
Returns
const Time& this object

◆ seconds()

unsigned long seconds ( ) const
inline

Get the number of seconds in this Time object.

Returns
unsigned long seconds value

The documentation for this class was generated from the following file: