class VTime

Class VThread Defines a time class which provides means of creating, adding, subtracting, and comparing times

Public Methods

u_int32_t getSeconds()
Access functions
void print()
Display time stored in VTime in decimal notation
VTime( u_int32_t sec, u_int32_t frac )
Create VTime object with specified seconds and fraction of a second.
VTime()
Create a new VTime object with the current system time.

Private Fields

u_int32_t fractional
this is the fraction of the second

Private Methods

friend VTime getVTime()
returns a VTime object based on the current system time
friend VTime operator+( const VTime& lhs, const unsigned int msec )
add specified number of milliseconds to VTime
friend VTime operator-( const VTime& lhs, const unsigned int msec )
subtract specified number of milliseconds from VTime
friend int operator-( const VTime& lhs, const VTime& rhs )
returns difference in terms of milliseconds, or 0 if rhs > lhs

Documentation

Class VThread Defines a time class which provides means of creating, adding, subtracting, and comparing times. VTime objects contain a second component and a fraction of second component. Both may be specified and accessed by the user. Routines to add and subtract times in terms of milliseconds are also provided.
VTime( u_int32_t sec, u_int32_t frac )
Create VTime object with specified seconds and fraction of a second.

VTime()
Create a new VTime object with the current system time.

u_int32_t getSeconds()
Access functions

void print()
Display time stored in VTime in decimal notation

u_int32_t fractional
this is the fraction of the second. 1 second == 2^32 fractional .

friend VTime operator+( const VTime& lhs, const unsigned int msec )
add specified number of milliseconds to VTime

friend VTime operator-( const VTime& lhs, const unsigned int msec )
subtract specified number of milliseconds from VTime

friend int operator-( const VTime& lhs, const VTime& rhs )
returns difference in terms of milliseconds, or 0 if rhs > lhs

friend VTime getVTime()
returns a VTime object based on the current system time


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++