This class provides comparison operators for the standard time types, struct timeval, and time_t. Should possibly be extended to work with the structures produced by the ctime set of libraries.
Definition at line 44 of file old-Time.H.
Public Member Functions | |
Time () | |
The standard constructor sets the value to the current time. | |
Time (const Time &m) | |
Time (time_t value) | |
Takes a time_t value, and leaves internal microseconds set to 0. | |
Time (struct timeval _tv) | |
Sets time to the value contained in struct timeval _tv. | |
Time (struct timespec _ts) | |
~Time () | |
const Time & | operator= (const Time &right) |
bool | operator== (const Time &right) const |
bool | operator!= (const Time &right) const |
bool | operator< (const Time &right) const |
bool | operator> (const Time &right) const |
bool | operator<= (const Time &right) const |
bool | operator>= (const Time &right) const |
Time | operator+ (const Time &right) const |
Time | operator- (const Time &right) const |
const Time & | operator= (const struct timeval &right) |
bool | operator== (const struct timeval &right) const |
bool | operator!= (const struct timeval &right) const |
bool | operator< (const struct timeval &right) const |
bool | operator> (const struct timeval &right) const |
bool | operator<= (const struct timeval &right) const |
bool | operator>= (const struct timeval &right) const |
Time | operator+ (const struct timeval &right) const |
Time | operator- (const struct timeval &right) const |
const Time & | operator= (const time_t &right) |
bool | operator== (const time_t &right) const |
bool | operator!= (const time_t &right) const |
bool | operator< (const time_t &right) const |
bool | operator> (const time_t &right) const |
bool | operator<= (const time_t &right) const |
bool | operator>= (const time_t &right) const |
Time | operator+ (const time_t &right) const |
Time | operator- (const time_t &right) const |
const Time & | operator= (const struct timespec &right) |
bool | operator== (const struct timespec &right) const |
bool | operator!= (const struct timespec &right) const |
bool | operator< (const struct timespec &right) const |
bool | operator> (const struct timespec &right) const |
bool | operator<= (const struct timespec &right) const |
bool | operator>= (const struct timespec &right) const |
Time | operator+ (const struct timespec &right) const |
Time | operator- (const struct timespec &right) const |
void | now () |
Sets the value of the object to the current time. | |
void | zero () |
Sets the time value to zero. | |
time_t | getSeconds () const |
Returns the value of the seconds field. | |
time_t | getUSeconds () const |
Returns the value of the microseconds field. | |
void | setSeconds (time_t sec) |
Set the seconds value. | |
void | setUSeconds (time_t usec) |
Set the usec value. | |
timeval | getTimeval () |
Returns the timeval structure value. | |
timespec | timespec () |
Time () | |
Time (const Time &m) | |
Time (time_t value) | |
Time (struct timeval _tv) | |
Time (struct timespec ts) | |
~Time () | |
const Time & | operator= (const Time &right) |
bool | operator== (const Time &right) const |
bool | operator!= (const Time &right) const |
bool | operator< (const Time &right) const |
bool | operator> (const Time &right) const |
bool | operator<= (const Time &right) const |
bool | operator>= (const Time &right) const |
Time | operator+ (const Time &right) const |
Time | operator- (const Time &right) const |
const Time & | operator= (const struct timeval &right) |
bool | operator== (const struct timeval &right) const |
bool | operator!= (const struct timeval &right) const |
bool | operator< (const struct timeval &right) const |
bool | operator> (const struct timeval &right) const |
bool | operator<= (const struct timeval &right) const |
bool | operator>= (const struct timeval &right) const |
Time | operator+ (const struct timeval &right) const |
Time | operator- (const struct timeval &right) const |
const Time & | operator= (const time_t &right) |
bool | operator== (const time_t &right) const |
bool | operator< (const time_t &right) const |
bool | operator> (const time_t &right) const |
bool | operator<= (const time_t &right) const |
bool | operator>= (const time_t &right) const |
Time | operator+ (const time_t &right) const |
Time | operator- (const time_t &right) const |
const Time & | operator= (const struct timespec &right) |
bool | operator== (const struct timespec &right) const |
bool | operator!= (const struct timespec &right) const |
bool | operator< (const struct timespec &right) const |
bool | operator> (const struct timespec &right) const |
bool | operator<= (const struct timespec &right) const |
bool | operator>= (const struct timespec &right) const |
Time | operator+ (const struct timespec &right) const |
Time | operator- (const struct timespec &right) const |
const Time & | operator= (const double &right) |
Time | operator * (const float &right) const |
void | now () |
Sets the value of the object to the current time. | |
void | zero () |
Sets the time value to zero. | |
time_t | getSeconds () const |
Returns the value of the seconds field. | |
time_t | getUSeconds () const |
Returns the value of the microseconds field. | |
void | setSeconds (time_t sec) |
Set the seconds value. | |
void | setUSeconds (time_t usec) |
Set the usec value. | |
timeval | getTimeval () |
Returns the timeval structure value. | |
timespec | timespec () |
Protected Attributes | |
timeval | m_tv |
timezone | m_tz |
timeval | m_tv |
timezone | m_tz |
Time | ( | ) |
The standard constructor sets the value to the current time.
Definition at line 34 of file Time.cpp.
References Time::m_tv, and Time::m_tz.
Referenced by Time::Time().
Time | ( | time_t | value | ) |
Takes a time_t value, and leaves internal microseconds set to 0.
Definition at line 43 of file Time.cpp.
References Time::m_tv, and Time::Time().
Time | ( | struct timeval | _tv | ) |
Sets time to the value contained in struct timeval _tv.
Definition at line 50 of file Time.cpp.
References Time::m_tv, and Time::Time().
Time | ( | struct timespec | _ts | ) |
Time | ( | ) | [inline] |
Time | ( | time_t | value | ) | [inline] |
Time | ( | struct timeval | _tv | ) | [inline] |
Time | ( | struct timespec | ts | ) | [inline] |
bool operator== | ( | const Time & | right | ) | const |
bool operator!= | ( | const Time & | right | ) | const |
bool operator< | ( | const Time & | right | ) | const |
bool operator> | ( | const Time & | right | ) | const |
bool operator<= | ( | const Time & | right | ) | const |
bool operator>= | ( | const Time & | right | ) | const |
const Time & operator= | ( | const struct timeval & | right | ) |
bool operator== | ( | const struct timeval & | right | ) | const |
bool operator!= | ( | const struct timeval & | right | ) | const |
bool operator< | ( | const struct timeval & | right | ) | const |
bool operator> | ( | const struct timeval & | right | ) | const |
bool operator<= | ( | const struct timeval & | right | ) | const |
bool operator>= | ( | const struct timeval & | right | ) | const |
Time operator+ | ( | const struct timeval & | right | ) | const |
Time operator- | ( | const struct timeval & | right | ) | const |
const Time & operator= | ( | const time_t & | right | ) |
bool operator== | ( | const time_t & | right | ) | const |
bool operator!= | ( | const time_t & | right | ) | const |
bool operator< | ( | const time_t & | right | ) | const |
bool operator> | ( | const time_t & | right | ) | const |
bool operator<= | ( | const time_t & | right | ) | const |
bool operator>= | ( | const time_t & | right | ) | const |
Time operator+ | ( | const time_t & | right | ) | const |
Time operator- | ( | const time_t & | right | ) | const |
const Time & operator= | ( | const struct timespec & | right | ) |
bool operator== | ( | const struct timespec & | right | ) | const |
bool operator!= | ( | const struct timespec & | right | ) | const |
bool operator< | ( | const struct timespec & | right | ) | const |
bool operator> | ( | const struct timespec & | right | ) | const |
bool operator<= | ( | const struct timespec & | right | ) | const |
bool operator>= | ( | const struct timespec & | right | ) | const |
Time operator+ | ( | const struct timespec & | right | ) | const |
Time operator- | ( | const struct timespec & | right | ) | const |
void now | ( | ) | [inline] |
Sets the value of the object to the current time.
Definition at line 116 of file old-Time.H.
References Time::m_tv, and Time::m_tz.
Referenced by WURDE1394Camera::captureGray(), WURDE1394Camera::captureRGB(), WURDE1394Camera::captureYUV24(), WURDE1394Camera::captureYUV422(), CommsManager::CommsManager(), WallBuilder::init(), VisionControl::init(), VectorMoverTransport::init(), SoundController::init(), RobotDrive::init(), RangeFinder::init(), PTUnit::init(), Power::init(), PlaybackControl::init(), ObstacleAvoiderTransport::init(), McpRequest::init(), MCPControl::init(), LoggerTransport::init(), ImageTransport::init(), ImageDisplay::init(), Heartbeat::init(), Foo::init(), FaceDetector::init(), Egomotion::init(), Bumper::init(), BlobFinder::init(), main(), WallBuilder::publishData(), VisionControl::publishData(), VectorMoverTransport::publishData(), SoundController::publishData(), RobotDrive::publishData(), RangeFinder::publishData(), PTUnit::publishData(), Power::publishData(), PlaybackControl::publishData(), ObstacleAvoiderTransport::publishData(), McpRequest::publishData(), MCPControl::publishData(), LoggerTransport::publishData(), ImageTransport::publishData(), ImageDisplay::publishData(), Heartbeat::publishData(), Foo::publishData(), FaceDetector::publishData(), Egomotion::publishData(), Bumper::publishData(), BlobFinder::publishData(), ImageSource::publishImage(), WallBuilder::publishInfo(), VisionControl::publishInfo(), VectorMoverTransport::publishInfo(), SoundController::publishInfo(), RobotDrive::publishInfo(), RangeFinder::publishInfo(), PTUnit::publishInfo(), Power::publishInfo(), PlaybackControl::publishInfo(), ObstacleAvoiderTransport::publishInfo(), McpRequest::publishInfo(), MCPControl::publishInfo(), LoggerTransport::publishInfo(), ImageTransport::publishInfo(), ImageDisplay::publishInfo(), Heartbeat::publishInfo(), Foo::publishInfo(), FaceDetector::publishInfo(), Egomotion::publishInfo(), Bumper::publishInfo(), BlobFinder::publishInfo(), Trigger::reset(), CommsManager::runUpdate(), Logger::setNetworkLogging(), Timer::sleep(), Module::stale(), Module::startUp(), and Timer::Timer().
void zero | ( | ) | [inline] |
Sets the time value to zero.
Useful in certain situations
Definition at line 120 of file old-Time.H.
References Time::m_tv.
Referenced by Module::Module(), PlaybackTimer::sleep(), Timer::sleep(), and CommsManager::sleep().
time_t getSeconds | ( | ) | const [inline] |
Returns the value of the seconds field.
Definition at line 125 of file old-Time.H.
References Time::m_tv.
Referenced by WURDE1394Camera::captureYUV24(), StereoDataCollector::fileWriterThread(), ImageWriter::fileWriterThread1(), DataCollector::fileWriterThread1(), ImageWriter::fileWriterThread2(), DataCollector::fileWriterThread2(), ImageWriter::fileWriterThread3(), DataCollector::fileWriterThread3(), main(), and FileEntry::operator<().
time_t getUSeconds | ( | ) | const [inline] |
Returns the value of the microseconds field.
Definition at line 130 of file old-Time.H.
References Time::m_tv.
Referenced by WURDE1394Camera::captureYUV24(), StereoDataCollector::fileWriterThread(), ImageWriter::fileWriterThread1(), DataCollector::fileWriterThread1(), ImageWriter::fileWriterThread2(), DataCollector::fileWriterThread2(), ImageWriter::fileWriterThread3(), DataCollector::fileWriterThread3(), main(), and FileEntry::operator<().
void setSeconds | ( | time_t | sec | ) | [inline] |
Set the seconds value.
Definition at line 136 of file old-Time.H.
References Time::m_tv.
Referenced by DirectoryScanner::openDirectory(), Timer::setFrequency(), and CommsManager::setMinSleep().
void setUSeconds | ( | time_t | usec | ) | [inline] |
Set the usec value.
Definition at line 141 of file old-Time.H.
References Time::m_tv.
Referenced by DirectoryScanner::openDirectory(), Timer::setFrequency(), and CommsManager::setMinSleep().
struct timeval getTimeval | ( | ) | [inline] |
Returns the timeval structure value.
Definition at line 146 of file old-Time.H.
References Time::m_tv.
struct timespec timespec | ( | ) | [inline] |
Definition at line 148 of file old-Time.H.
References Time::m_tv.
Referenced by PlaybackTimer::sleep(), Timer::sleep(), and CommsManager::sleep().
bool operator== | ( | const Time & | right | ) | const [inline] |
bool operator!= | ( | const Time & | right | ) | const [inline] |
bool operator< | ( | const Time & | right | ) | const [inline] |
bool operator> | ( | const Time & | right | ) | const [inline] |
bool operator<= | ( | const Time & | right | ) | const [inline] |
bool operator>= | ( | const Time & | right | ) | const [inline] |
const Time& operator= | ( | const struct timeval & | right | ) | [inline] |
bool operator== | ( | const struct timeval & | right | ) | const [inline] |
bool operator!= | ( | const struct timeval & | right | ) | const [inline] |
bool operator< | ( | const struct timeval & | right | ) | const [inline] |
bool operator> | ( | const struct timeval & | right | ) | const [inline] |
bool operator<= | ( | const struct timeval & | right | ) | const [inline] |
bool operator>= | ( | const struct timeval & | right | ) | const [inline] |
Time operator+ | ( | const struct timeval & | right | ) | const [inline] |
Time operator- | ( | const struct timeval & | right | ) | const [inline] |
const Time& operator= | ( | const time_t & | right | ) | [inline] |
bool operator== | ( | const time_t & | right | ) | const [inline] |
bool operator< | ( | const time_t & | right | ) | const [inline] |
bool operator> | ( | const time_t & | right | ) | const [inline] |
bool operator<= | ( | const time_t & | right | ) | const [inline] |
bool operator>= | ( | const time_t & | right | ) | const [inline] |
Time operator+ | ( | const time_t & | right | ) | const [inline] |
Time operator- | ( | const time_t & | right | ) | const [inline] |
const Time& operator= | ( | const struct timespec & | right | ) | [inline] |
bool operator== | ( | const struct timespec & | right | ) | const [inline] |
bool operator!= | ( | const struct timespec & | right | ) | const [inline] |
bool operator< | ( | const struct timespec & | right | ) | const [inline] |
bool operator> | ( | const struct timespec & | right | ) | const [inline] |
bool operator<= | ( | const struct timespec & | right | ) | const [inline] |
bool operator>= | ( | const struct timespec & | right | ) | const [inline] |
Time operator+ | ( | const struct timespec & | right | ) | const [inline] |
Time operator- | ( | const struct timespec & | right | ) | const [inline] |
const Time& operator= | ( | const double & | right | ) | [inline] |
Time operator * | ( | const float & | right | ) | const [inline] |
void now | ( | ) | [inline] |
Sets the value of the object to the current time.
Definition at line 425 of file Time.H.
References Time::m_tv, and Time::m_tz.
void zero | ( | ) | [inline] |
Sets the time value to zero.
Useful in certain situations
Definition at line 429 of file Time.H.
References Time::m_tv.
time_t getSeconds | ( | ) | const [inline] |
Returns the value of the seconds field.
Definition at line 434 of file Time.H.
References Time::m_tv.
time_t getUSeconds | ( | ) | const [inline] |
Returns the value of the microseconds field.
Definition at line 439 of file Time.H.
References Time::m_tv.
void setSeconds | ( | time_t | sec | ) | [inline] |
void setUSeconds | ( | time_t | usec | ) | [inline] |
struct timeval getTimeval | ( | ) | [inline] |
struct timespec timespec | ( | ) | [inline] |
struct timeval m_tv [protected] |
Definition at line 157 of file old-Time.H.
Referenced by Time::getSeconds(), Time::getTimeval(), Time::getUSeconds(), Time::now(), Time::operator *(), Time::operator!=(), Time::operator+(), Time::operator-(), Time::operator<(), Time::operator<=(), Time::operator=(), Time::operator==(), Time::operator>(), Time::operator>=(), Time::setSeconds(), Time::setUSeconds(), Time::Time(), Time::timespec(), and Time::zero().
struct timezone m_tz [protected] |
Definition at line 159 of file old-Time.H.
Referenced by Time::now(), Time::operator+(), Time::operator-(), Time::operator=(), and Time::Time().