# Passenger::SystemTime Class Reference

`#include <SystemTime.h>`

List of all members.

## 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.

## 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.

## 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:

- SystemTime.h