Passenger::SystemTime Class Reference

This class allows one to obtain the system time, similar to time(). More...

#include <SystemTime.h>

List of all members.

Static Public Member Functions

static time_t get ()
 Returns the time since the Epoch, measured in seconds.
static void force (time_t value)
 Force get() to return the given value.
static void release ()
 Release the previously forced value, so that get() returns the system time once again.


Detailed Description

This class allows one to obtain the system time, similar to time().

Unlike time(), it is possible to force a certain time to be returned, which is useful for testing code that depends on the system time.


Member Function Documentation

static time_t Passenger::SystemTime::get (  )  [inline, static]

Returns the time since the Epoch, measured in seconds.

Or, if a time was forced, then the forced time is returned instead.

Exceptions:
SystemException Something went wrong while retrieving the time.
boost::thread_interrupted 


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

Generated on Wed Apr 8 22:35:12 2009 for Passenger by  doxygen 1.5.8