Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

wvtimeutils.h File Reference

#include <sys/time.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef timeval WvTime

Functions

time_t msecdiff (const WvTime &a, const WvTime &b)
 Returns the number of milliseconds between times a and b.

WvTime wvtime ()
 Returns the current time of day.

WvTime msecadd (const WvTime &a, time_t msec)
 Adds the specified number of milliseconds to a time value.

WvTime tvdiff (const WvTime &a, const WvTime &b)
 Returns the timeval difference between two timevals.

void normalize (WvTime &tv)
 Normalizes the time value.

bool operator< (const WvTime &a, const struct timeval &b)
 Compares two time values.

bool operator== (const WvTime &a, const struct timeval &b)

Variables

const WvTime wvtime_zero


Typedef Documentation

typedef struct timeval WvTime
 

Definition at line 19 of file wvtimeutils.h.

Referenced by WvRateAdjust::_encode(), WvStream::alarm_remaining(), WvTimeStream::execute(), WvTimeStream::pre_select(), and WvTimeStream::set_timer().


Function Documentation

WvTime msecadd const WvTime a,
time_t  msec
 

Adds the specified number of milliseconds to a time value.

Referenced by msecadd().

time_t msecdiff const WvTime a,
const WvTime b
 

Returns the number of milliseconds between times a and b.

void normalize WvTime tv  )  [inline]
 

Normalizes the time value.

Definition at line 38 of file wvtimeutils.h.

Referenced by msecadd(), and tvdiff().

bool operator< const WvTime a,
const struct timeval &  b
[inline]
 

Compares two time values.

Definition at line 45 of file wvtimeutils.h.

bool operator== const WvTime a,
const struct timeval &  b
[inline]
 

Definition at line 52 of file wvtimeutils.h.

WvTime tvdiff const WvTime a,
const WvTime b
 

Returns the timeval difference between two timevals.

Referenced by tvdiff().

WvTime wvtime  ) 
 

Returns the current time of day.

Definition at line 21 of file wvtimeutils.cc.

References wvtime().

Referenced by WvRateAdjust::_encode(), WvLogFileBase::_make_prefix(), WvStream::alarm(), WvStream::alarm_remaining(), WvTimeStream::execute(), WvStream::getline(), WvRateAdjust::init(), WvTimeStream::post_select(), WvTimeStream::pre_select(), WvTimeStream::set_timer(), and wvtime().


Variable Documentation

const WvTime wvtime_zero [static]
 

Initial value:

{ 0, 0 }

Definition at line 21 of file wvtimeutils.h.


Generated on Tue Oct 5 01:09:23 2004 for WvStreams by doxygen 1.3.7