In file time/Time.hh:

class Time

GPS time container class.

Inheritance:


Public Methods

Time (void)
Default constructor
explicit Time (ulong_t sec, ulong_t nsec=0)
Constructor from seconds and nanoseconds.
Time (const Time& t)
Copy constructor
Time& operator= (const Time&)
Assignment operator
Time& operator+= (const Interval& dt)
Add an Interval to a Time.
Interval operator - (const Time& dt) const
Subtract a Time rhs.
Time& operator-= (const Interval& dt)
Subtract a constant rhs
bool operator! (void) const
Compare to zero
bool operator== (const Time& rhs) const
Compare times (equality)
bool operator!= (const Time& rhs) const
Compare times (inequality)
bool operator>= (const Time& rhs) const
Compare times (Greater or Equal)
bool operator<= (const Time& rhs) const
Compare times (Less or equal)
bool operator> (const Time& rhs) const
Compare times (Greater)
bool operator< (const Time& rhs) const
Compare times (Less than)
ulong_t getS (void) const
Number of nanoseconds.
ulong_t getN (void) const
Number of nanoseconds.
double totalS (void) const
GPS seconds since t0.
double totalNS (void) const
GPS nanoseconds since t0.
double fracS (void) const
Get the fractional seconds.
void setS (ulong_t s)
set seconds field.
void setN (ulong_t n)
Set nanosecon field.

Documentation

The time class contains a GPS time in seconds and nanoseconds since midnight, January 6, 1980. The Time class is closely coupled with the Interval class which represents time intervals. All basic arithmetic operations are defined between the two classes. Ancillary (non-member) functions convert the GPS time to other representations
Time(void)
A Time instance is created with no initialization performed.

explicit Time(ulong_t sec, ulong_t nsec=0)
GPS time is constructed from seconds and nanoseconds. If the nanosecond field isn't specified, it is assumed to be zero.
Parameters:
sec - Number of GPS seconds since midnight, Jan 6, 1980.
nsec - Number of nanoseconds since last GPS second.

Time(const Time& t)
Copy constructor

Time& operator=(const Time&)
Assignment operator

Time& operator+=(const Interval& dt)
Add an Interval to a Time.

Interval operator -(const Time& dt) const
Subtract a Time rhs.

Time& operator-=(const Interval& dt)
Subtract a constant rhs

bool operator!(void) const
Compare to zero

bool operator==(const Time& rhs) const
Compare times (equality)

bool operator!=(const Time& rhs) const
Compare times (inequality)

bool operator>=(const Time& rhs) const
Compare times (Greater or Equal)

bool operator<=(const Time& rhs) const
Compare times (Less or equal)

bool operator>(const Time& rhs) const
Compare times (Greater)

bool operator<(const Time& rhs) const
Compare times (Less than)

ulong_t getS(void) const
Get the GPS second boundary.
Returns:
Then number of nanoseconds since a GPS secon.

ulong_t getN(void) const
Get the number of nanoseconds since a GPS second boundary.
Returns:
Then number of nanoseconds since a GPS secon.

double totalS(void) const
Get the GPS time in seconds since t0.
Returns:
The number of GPS seconds.

double totalNS(void) const
Get the GPS time in nanoseconds since t0.
Returns:
The number of GPS nanoseconds.

double fracS(void) const
Get the fraction of a second after an integer number of GPS seconds.

void setS(ulong_t s)
Set the number of seconds past the start of the second GPS epoch.

void setN(ulong_t n)
Set the number of nanoseconds offset from the seconds field.


This class has no child classes.
Author:
John G. Zweizig
Version:
1.1; Modified: August 23, 1999

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++