- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Interfaces::TimeService Class Reference

`#include <TimeService.h>`

Inheritance diagram for Mers::Interfaces::TimeService:

[legend]
Collaboration diagram for Mers::Interfaces::TimeService:

[legend]
List of all members.

## Public Member Functions
| TimeService ()
virtual | ~TimeService ()
virtual double | time ()=0

## Detailed Description

This class represents a general set of methods of accessing and manipulating information about the current time. Note that this class should be thread-safe. This class does not implement any locking mechanisms to enforce the thread safety of this class.

Author:
  Paul H. Elliott

Definition at line 32 of file TimeService.h.

## Constructor & Destructor Documentation

TimeService::TimeService | ( |  | ) |

Creates a new TimeService object.

This object is reference based, and so will delete itself when all of its references have been removed. Thus, the creating application should add at least one reference before requesting the current time. The reference count starts at zero.

Definition at line 21 of file TimeService.cpp.

TimeService::~TimeService | ( |  | ) | `[virtual]`

Destroys this object. Note that this function presumes that mReferences is 0, and so all objects that refer to this time service have already been de-referenced and deleted.

Definition at line 27 of file TimeService.cpp.

## Member Function Documentation

virtual double Mers::Interfaces::TimeService::time | ( |  | ) | `[pure virtual]`

Returns the current number of seconds that have elapsed since Epoch - (00:00:00 UTC, January 1, 1970).

Returns:
  The number of seconds that have elapsed since Epoch.

Implemented in Mers::Interfaces::SystemTimeService.

Referenced by Mers::Interfaces::ElapsedTimeService::elapsed(), and Mers::Interfaces::ElapsedTimeService::resetTime().

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

- /Users/fpy/titan-1-5-MBARI/Mers/Interfaces/TimeService.h
- /Users/fpy/titan-1-5-MBARI/Mers/Interfaces/TimeService.cpp