Sirikata
|
Represents an absolute system time on this machine. More...
#include <Time.hpp>
Public Member Functions | |
LocalTime () | |
uint64 | raw () const |
bool | operator== (const LocalTime &other) const |
Equality comparison (same as (*this - other) == 0) | |
bool | operator!= (const LocalTime &other) const |
bool | operator< (const LocalTime &other) const |
Ordering comparison (same as (*this - other) < 0) | |
bool | operator<= (const LocalTime &other) const |
bool | operator> (const LocalTime &other) const |
bool | operator>= (const LocalTime &other) const |
DeltaTime | operator- (const LocalTime &other) const |
Takes the difference of two absolute times. | |
LocalTime | operator+ (const DeltaTime &otherDelta) const |
Adds a time difference to a given absolute time. | |
LocalTime | operator- (const DeltaTime &otherDelta) const |
void | operator+= (const DeltaTime &otherDelta) |
void | operator-= (const DeltaTime &otherDelta) |
Static Public Member Functions | |
static LocalTime | microseconds (int64 abstime) |
static LocalTime | now () |
The only public construction function for absolute times. | |
static LocalTime | epoch () |
Creates the time when items are 0. | |
static LocalTime | null () |
Creates a 'null' absolute time that is equivalent to a long time ago in a galaxy far away. | |
Protected Member Functions | |
LocalTime (uint64 t) | |
Private constructor-- Use "now()" to create an LocalTime. | |
Private Attributes | |
uint64 | mTime |
Represents an absolute system time on this machine.
Note: LocalTime is stored internally as an int64. The only two ways to create an LocalTime object are by adding to another LocalTime, and by calling LocalTime::now().
Sirikata::Task::LocalTime::LocalTime | ( | uint64 | t | ) | [inline, explicit, protected] |
Private constructor-- Use "now()" to create an LocalTime.
Sirikata::Task::LocalTime::LocalTime | ( | ) | [inline] |
Referenced by Sirikata::Time::operator!=(), Sirikata::Time::operator+(), Sirikata::Time::operator+=(), Sirikata::Time::operator-(), Sirikata::Time::operator-=(), Sirikata::Time::operator<(), Sirikata::Time::operator<=(), Sirikata::Time::operator==(), Sirikata::Time::operator>(), Sirikata::Time::operator>=(), and Sirikata::Time::raw().
static LocalTime Sirikata::Task::LocalTime::epoch | ( | ) | [inline, static] |
Creates the time when items are 0.
Reimplemented in Sirikata::Time.
Referenced by Sirikata::Graphics::OgreRenderer::preFrame().
static LocalTime Sirikata::Task::LocalTime::microseconds | ( | int64 | abstime | ) | [inline, static] |
Reimplemented in Sirikata::Time.
Referenced by now().
Sirikata::Task::LocalTime Sirikata::Task::LocalTime::now | ( | ) | [static] |
The only public construction function for absolute times.
References microseconds().
Referenced by Sirikata::Task::DeltaTime::fromNow(), Sirikata::Poller::handleExec(), Sirikata::Time::local(), Sirikata::Graphics::OgreSystem::poll(), Sirikata::Graphics::OgreRenderer::poll(), Sirikata::Graphics::OgreRenderer::renderOneFrame(), and Sirikata::Graphics::ResourceLoader::tick().
static LocalTime Sirikata::Task::LocalTime::null | ( | ) | [inline, static] |
Creates a 'null' absolute time that is equivalent to a long time ago in a galaxy far away.
Always less than a real time, and equal to another null() value.
Reimplemented in Sirikata::Time.
bool Sirikata::Task::LocalTime::operator!= | ( | const LocalTime & | other | ) | const [inline] |
References mTime.
Adds a time difference to a given absolute time.
References Sirikata::Task::DeltaTime::toMicro().
void Sirikata::Task::LocalTime::operator+= | ( | const DeltaTime & | otherDelta | ) | [inline] |
References Sirikata::Task::DeltaTime::toMicro().
Takes the difference of two absolute times.
References Sirikata::Task::DeltaTime::microseconds(), and mTime.
void Sirikata::Task::LocalTime::operator-= | ( | const DeltaTime & | otherDelta | ) | [inline] |
bool Sirikata::Task::LocalTime::operator< | ( | const LocalTime & | other | ) | const [inline] |
Ordering comparison (same as (*this - other) < 0)
References mTime.
bool Sirikata::Task::LocalTime::operator<= | ( | const LocalTime & | other | ) | const [inline] |
References mTime.
bool Sirikata::Task::LocalTime::operator== | ( | const LocalTime & | other | ) | const [inline] |
Equality comparison (same as (*this - other) == 0)
References mTime.
bool Sirikata::Task::LocalTime::operator> | ( | const LocalTime & | other | ) | const [inline] |
References mTime.
bool Sirikata::Task::LocalTime::operator>= | ( | const LocalTime & | other | ) | const [inline] |
References mTime.
uint64 Sirikata::Task::LocalTime::raw | ( | ) | const [inline] |
Reimplemented in Sirikata::Time.
uint64 Sirikata::Task::LocalTime::mTime [private] |
Referenced by operator!=(), operator-(), operator<(), operator<=(), operator==(), operator>(), and operator>=().