AURobotServers  4
Public Member Functions | Public Attributes | List of all members
UTime Class Reference

#include <utime.h>

Inheritance diagram for UTime:
Inheritance graph

Public Member Functions

void add (double seconds)
 
void clear ()
 
char * getAsSml (const char *name, char *buff, int buffCnt)
 
int GetDateString (char *sDate, bool local=true)
 
int getDateString (char *sDate, bool local=true)
 
char * getDateTimeAsString (char *info, bool local=true)
 
int GetDayInMonth ()
 
int GetDayInYear ()
 
long GetDaySerial ()
 
double GetDecSec ()
 
double getDecSec ()
 
double GetDecSec (UTime t1)
 
char * getForFilename (char *info, bool local=true)
 
char GetHour (bool local=true)
 
char GetJustSec ()
 
char getJustSec ()
 
int getMdrFromString (const char *month3char)
 
unsigned long GetMicrosec ()
 
unsigned long getMicrosec ()
 
long GetMilisec ()
 
long getMilisec ()
 
char GetMin ()
 
int GetMonth (int *dayInMonth=NULL, bool local=true)
 
unsigned long GetSec ()
 
unsigned long getSec ()
 
int GetTimeAsString (char *info, bool local=true)
 
int getTimeAsString (char *info, bool local=true)
 
double getTimePassed ()
 
struct tm getTimeTm (bool local=true)
 
struct timeval getTimeval ()
 
int GetYear (int *dayInYear=NULL, bool local=true)
 
bool isLeapYear (int year)
 
int LoadFromReg (Uconfig *ini, const char *subject, const char *key)
 
void Now ()
 
void now ()
 
bool operator!= (UTime other)
 
UTime operator+ (double seconds)
 
void operator+= (double seconds)
 
double operator- (UTime old)
 
UTime operator- (double seconds)
 
void operator-= (double seconds)
 
bool operator< (UTime other)
 
bool operator< (double other)
 
bool operator<= (double other)
 
bool operator<= (UTime other)
 
bool operator== (UTime other)
 
bool operator> (UTime other)
 
bool operator> (double other)
 
bool operator>= (UTime other)
 
bool operator>= (double other)
 
void print (const char *prestring=NULL)
 
int SaveToReg (Uconfig *ini, const char *subject, const char *key)
 
void SetTime (timeval iTime)
 
void setTime (double decimalSec)
 
void SetTime (double decimalSec)
 
void SetTime (long sec, long uSec)
 
void setTime (long sec, long uSec)
 
void SetTime (int year, int month, int day, int hour=0, int min=0, int sec=0, long usec=0)
 
void setTime (int year, int month, int day, int hour=0, int min=0, int sec=0, long usec=0)
 
void setTimeTod (const char *tod)
 
void setTimeU (unsigned long sec, unsigned long uSec)
 
void show (const char *prestring=NULL)
 
void sub (double seconds)
 
 UTime ()
 
 ~UTime ()
 

Public Attributes

timeval time
 
bool valid
 

Detailed Description

Class encapsulation the time structure used by 'gettimeofday' with resolution in years down to micro-seconds. The class has functions to make simple time calculations and conversion to and from string in localized format.

Constructor & Destructor Documentation

UTime::UTime ( )

Constructor

References clear().

UTime::~UTime ( )

Destructor

Member Function Documentation

void UTime::add ( double  seconds)

Add this number of seconds to the current value

References GetDecSec(), and setTime().

Referenced by operator+(), operator+=(), and operator-=().

void UTime::clear ( void  )
char * UTime::getAsSml ( const char *  name,
char *  buff,
int  buffCnt 
)

Code time in XML-like format. If 'name' is NULL, then no name attribute is included. The tag name is 'time', and format is like:
< time name="name" sec=107096665 usec=123456/> (in seconds and microsec since 1970). Returns pointer to provided buffer.

References time.

Referenced by print(), and USmlTag::sendProbPoly().

int UTime::GetDateString ( char *  sDate,
bool  local = true 
)
int UTime::getDateString ( char *  sDate,
bool  local = true 
)
inline
char * UTime::getDateTimeAsString ( char *  info,
bool  local = true 
)

Writes time to INFO in format "yyyy-MM-dd hh:mm:ss.msec"

Parameters
infois a bugger for the string, must be at least 24 characters long.
localshould time be in local time (else UTM if set on computer)
Returns
pointer to the info buffer

References GetMilisec(), and time.

Referenced by UResLaserIfObst::listGroups(), UNavPaint::printRefSystems(), UNavView::printRefSystems(), and SetTime().

int UTime::GetDayInMonth ( )

Get day in month range 1..31.

References GetMonth().

Referenced by getTimeAsString().

int UTime::GetDayInYear ( )

Get day in year in range 1..366.

References GetYear().

Referenced by getTimeAsString().

long UTime::GetDaySerial ( )

Get number of days with day 1 as 1 jan 1970.

References time.

Referenced by getJustSec().

double UTime::GetDecSec ( )
double UTime::getDecSec ( )
inline
double UTime::GetDecSec ( UTime  t1)

Get time since t1 as decimal seconds.

References time.

char * UTime::getForFilename ( char *  info,
bool  local = true 
)

Writes time to INFO in format "yyyyMMdd_hhmmss.msec"

Parameters
infois a bugger for the string, must be at least 19 characters long.
localshould time be in local time (else UTM if set on computer)
Returns
pointer to the info buffer

References GetMilisec(), and time.

Referenced by UClientFuncLaserGui::doImage(), UFuncView::handleCommand(), UFunctionImage::handleImageGetCommand(), UFunctionImgPool::handleImageGetCommand(), UImageLog::logImage(), UImg3Dpoints::makePCLFile(), UClientFuncLaserGui::saveImage(), UClientFuncImgGui::saveImage(), USmrCl::saveMrcLog(), UFunctionVarPool::sendVar(), and SetTime().

char UTime::GetHour ( bool  local = true)

Get hour value on this day in range 0..23

References time.

Referenced by UCalibrationMarkSet::evaluateChartPosRot(), getJustSec(), and testTime().

char UTime::GetJustSec ( )
inline

Get number of seconds within last minute in range 0..59

References time.

Referenced by UCalibrationMarkSet::evaluateChartPosRot(), and testTime().

char UTime::getJustSec ( )
inline
int UTime::getMdrFromString ( const char *  month3char)

Get month number form 3 character string. String value must match one of: Jan Feb Mas Apr May Jun Jul Aug Sep Oct Nov Dec. Returns 0 if no match were found.

Referenced by getTimeval().

unsigned long UTime::GetMicrosec ( )
unsigned long UTime::getMicrosec ( )
inline

References GetDecSec(), and GetMicrosec().

Referenced by UResPoseHist::addPoseHist(), USmlTag::codePoseTime1(), USmlTag::codeTime(), UPcpItem::codeXML(), UResLocater::doLocatorUpdates(), UResSmrIf::doUserEvent(), UResSmrIf::eventGpsUpdate(), USmrCl::eventGpsUpdate(), UResSmrIf::eventInsUpdate(), USmrCl::eventInsUpdate(), UCmdExe::executeFunction(), UResAuEf::findFeatures(), UPoseHistNotUsed::getPoseNearTime(), UManLine::getSMRCLcmd2(), UManArc::getSMRCLcmd2(), UResSmrCtl::getSMRCLDrive2cmd(), UFuncLobst::handleCommand(), URawServerPort::handleOneMessageFromQueue(), UCmdExe::handleOneMessageFromQueue(), UCmdExe::handleOneServerPushMessage(), UFunctionPassable::handlePass(), UFunctionPoseHist::handlePoseHistCommand(), UCmdExe::handleServerCommand(), UFunctionLaser::handleSetCommand(), UCmdExe::killServer(), UFunctionPoseHist::listPoses(), UResLocater::locate(), UVarHist::logDataDouble(), UImageLog::logImage(), UServerClient::logWrite(), UNavPaint::paintOdoDataText(), UNavView::paintOdoDataText(), UServerInMsg::print(), UNavPaint::printRefSystems(), UNavView::printRefSystems(), UResIf::replayToTime(), UResLocater::rowEndDetect(), UPoseHistNotUsed::saveToLog(), UResPoseHist::saveToLog(), UVariable::saveToLog(), UFunctionAvoid::sendCurrentAvoidPath(), UFunctionAvoid::sendCurrentPath(), UFunctionPassable::sendFullScan(), UFunctionAvoid::sendManSeq(), UResSmrCtl::sendNewManoeuvreToSMR(), UFuncObj3d::sendObjects(), UFunctionPassable::sendObstacles(), UClientHandler::sendPing(), UServerClient::sendPingReply(), UFunctionPassable::sendRoadLines(), UFunctionLaser::sendScan(), UFunctionVarPool::sendVar(), UPoseTVQ::snprint(), ULogFile::toLog(), UHokuyo::toLog(), USmrCl::toLog(), UResGps::toLog(), UResRoadLine::updateRoadVariables(), and UCamDevIeee1394::~UCamDevIeee1394().

long UTime::GetMilisec ( )

Get milisecond value within second in range 0..999

References time, and valid.

Referenced by getDateTimeAsString(), getForFilename(), getMilisec(), getSec(), GetTimeAsString(), and USmrOdoState::logState().

long UTime::getMilisec ( )
inline
char UTime::GetMin ( )

Get minute value within last hour in range 0..59

References time.

Referenced by UCalibrationMarkSet::evaluateChartPosRot(), getJustSec(), and testTime().

int UTime::GetMonth ( int *  dayInMonth = NULL,
bool  local = true 
)

Get month in range 1..12.

References time.

Referenced by GetDayInMonth(), getTimeAsString(), and testTime().

unsigned long UTime::GetSec ( )
unsigned long UTime::getSec ( )
inline

References GetMilisec(), and GetSec().

Referenced by UPoseHistNotUsed::addIfNeeded(), UResPoseHist::addIfNeeded(), UResPoseHist::addPoseHist(), USmlTag::codePoseTime1(), USmlTag::codeTime(), UPcpItem::codeXML(), UResLocater::doLocatorUpdates(), UResSmrIf::doUserEvent(), UResSmrIf::eventGpsUpdate(), USmrCl::eventGpsUpdate(), UResSmrIf::eventInsUpdate(), USmrCl::eventInsUpdate(), UCmdExe::executeFunction(), UResAuEf::findFeatures(), UResAvoid::findPathToHere(), UPoseHistNotUsed::getPoseNearTime(), UManLine::getSMRCLcmd2(), UManArc::getSMRCLcmd2(), UResSmrCtl::getSMRCLDrive2cmd(), UFunctionCam::handleCamSetCommand(), UFuncLobst::handleCommand(), UFuncLoca2::handleLocalize(), URawServerPort::handleOneMessageFromQueue(), UCmdExe::handleOneMessageFromQueue(), UCmdExe::handleOneServerPushMessage(), UFunctionPassable::handlePass(), UClientFuncLaser::handlePath(), UFunctionPoseHist::handlePoseHistCommand(), UCmdExe::handleServerCommand(), UFunctionLaser::handleSetCommand(), UResIf::interfaceTick(), UCmdExe::killServer(), UFunctionPoseHist::listPoses(), UResLocater::locate(), UVarHist::logDataDouble(), UImageLog::logImage(), USmrOdoState::logState(), UServerClient::logWrite(), UNavPaint::paint(), UNavPaint::paintOdoDataText(), UNavView::paintOdoDataText(), UServerInMsg::print(), UNavPaint::printRefSystems(), UNavView::printRefSystems(), UResIf::replayToTime(), UResLocater::rowEndDetect(), UPoseHistNotUsed::saveToLog(), UResPoseHist::saveToLog(), UVariable::saveToLog(), UFunctionAvoid::sendCurrentAvoidPath(), UFunctionAvoid::sendCurrentPath(), UFunctionAvoid::sendManSeq(), UResSmrCtl::sendNewManoeuvreToSMR(), UFuncObj3d::sendObjects(), UFunctionPassable::sendObstacles(), UClientHandler::sendPing(), UServerClient::sendPingReply(), UFunctionPassable::sendRoadLines(), UFunctionVarPool::sendVar(), UResLocater::set_state(), UPoseTVQ::snprint(), ULogFile::toLog(), UHokuyo::toLog(), USmrCl::toLog(), UResGps::toLog(), UResRoadLine::updateRoadVariables(), and UCamDevIeee1394::~UCamDevIeee1394().

int UTime::GetTimeAsString ( char *  info,
bool  local = true 
)

Writes time to INFO in format "hh:mm:ss.msec"

Parameters
infodestination buffer, must be at least 13 characters long
localconverts time to local time (is system time is UTM or somthing)

References GetMilisec(), and time.

Referenced by UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), getTimeAsString(), and SetTime().

int UTime::getTimeAsString ( char *  info,
bool  local = true 
)
inline
double UTime::getTimePassed ( )

Get time past since this time

References Now().

Referenced by UFuncKinect::callGotNewDataWithObject(), UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UResObj3d::do3dVoxels(), UResDisp::doRepaintImages(), UClientFuncLaserGui::doTimeTick(), UResDrivePos::driveOdo(), UCmdExe::executeFunction(), UImgPush::fillBuffer(), UImgPush::fillShowBuffer(), UFuncImgPoly::findAreaFromSeedRGB(), UCalibrate::findGmk(), UAvoidPath2::findObstAvoidRoute(), UFunctionCamPath::findPath(), USmrCl::getDataFromLine(), getDecSec(), USmlSource::getToEndTag(), UFunctionGps::handleCommand(), UFuncLinefinder::handleCommand(), UFuncKinect::handleKinect(), UFuncPiCam::handleNormal(), UCmdExe::handleOneMessageFromQueue(), UCmdExe::handleOneServerPushMessage(), UFunctionPoseHist::handlePoseHistCommand(), UFuncLinefinder::houghTest(), UResIf::interfaceTick(), UCmdExe::isClientAlive(), UAvoidCellGraph::makeCellDecomposition(), UFuncTracking::matching(), UMisRuleState::methodWait(), UFuncTracking::object_classification(), ULaserSim::receiveData(), ULms100::receiveData(), ULms500::receiveData(), UHokuyo::receiveData(), UFuncImu::run(), UFuncView::run(), UResRhdIf::run(), UFuncKinect::run(), UCmdExe::run(), USmrCl::run(), UCronJob::runJob(), UServerClient::sendAliveReply(), UResSmrCtl::sendNewManoeuvreToSMR(), USmrCl::sendSMReval(), UServerPort::serverAliveLast(), UServerPort::serviceClients(), USmlSource::skipToEndTag(), testVideo3(), testZlib(), ULaserDevice::threadRunLoop(), UClientHandler::threadRunLoop(), UKeepItem::tick(), UFuncStraightLine::toWorld(), UFuncTracking::visualize_static(), UCamDevGuppy::~UCamDevGuppy(), and UCamDevIeee1394::~UCamDevIeee1394().

struct tm UTime::getTimeTm ( bool  local = true)

Convert seconds to time_tm strucure.

Parameters
when'local' is true the local time is returned, else GMT.
Returns
the structure with year (year 1900 == 0), month, day, hour, min and sec.

References time.

Referenced by UResGps::getTimeLocal(), UGpsLatLong::parseGPGGA(), and UGpsLatLong::parseGPRMC().

struct timeval UTime::getTimeval ( )
inline

Get copy of timevalue structure

References getMdrFromString(), show(), and time.

Referenced by UFuncKinect::run().

int UTime::GetYear ( int *  dayInYear = NULL,
bool  local = true 
)

Get year - valid from 1970 to 2099 only.

References time.

Referenced by GetDayInYear(), getTimeAsString(), and testTime().

bool UTime::isLeapYear ( int  year)

Returns trye if 'year' is a leap year. (every 4th year is, except every 100th year wich is not, except evert 1000th year wich is a leap year).

Referenced by getDateString().

int UTime::LoadFromReg ( Uconfig ini,
const char *  subject,
const char *  key 
)

Save time value in XML frmat Load tie value from config file

References Uconfig::strGet(), time, and valid.

Referenced by getJustSec().

void UTime::Now ( )
inline

Set time value to system time now using gettimeofday()

References time, and valid.

Referenced by UPush::addPushCommand(), UServerPush::addPushCommand(), UAvoidPath2::addStartAndExit(), UFuncKinect::callGotNewDataWithObject(), UFuncTracking::clustering(), ULms100::decodeData(), ULms500::decodeData(), UResDisp::doRepaintImages(), UCalibrationMarkSet::evaluateChartPosRot(), UFuncImgPoly::findAreaFromSeedRGB(), UImAna::findContour(), UImageAna::findContour(), UResObj3d::findContour(), UImAna::findContourPoly(), UImageAna::findContourPoly(), UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), UCalibrate::findGmk(), UFunctionCamPath::findPath(), UImageAna::findRoadFill(), UImAna::findRoadPoly(), UImageAna::findRoadPoly(), UImagePoly::findRoadPoly(), USmrCl::getDataFromLine(), UImage::GetNewNonCameraImage(), UServerPushQueue::getNextTimedPushElement(), UPoseHistNotUsed::getOldestTime(), UResPoseHist::getOldestTime(), getTimePassed(), USmlSource::getToEndTag(), UClientCamData::handleCamGet(), UFuncLinefinder::handleCommand(), UFunctionImgPool::handleImageSetCommand(), UClientHandler::handlePingReply(), UFunctionPoseHist::handlePoseHistCommand(), UCmdExe::handleServerCommand(), UCmdExe::handleServerPushCommand(), UFuncLinefinder::houghTest(), UServerClient::initConnection(), UProbGrid::makeProbGrid2(), UFuncTracking::matching(), UFuncView::methodCall(), UFuncTracking::nearest_neighbors_cluster(), UFuncTracking::object_classification(), UFuncTracking::object_classification_frame1(), UClientFuncLaserGui::paintOdoData(), UNavPaint::paintOdoDataText(), UNavView::paintOdoDataText(), UCamDevice::protOpenDevice(), UCamPwc::readFramesThread(), UCamDevice::readFramesThread(), ULaserSim::receiveData(), UServerClient::receiveData(), UHokuyo::receiveData(), UClientFuncLaserGui::repaint(), UFuncPiCam::run(), UResCron::run(), UFuncKinect::run(), UResKeep::run(), UResGps::run(), UResSmrCtl::sendNewManoeuvreToSMR(), UClientHandler::sendPing(), UServerClient::sendPingReply(), USmrCl::sendSMReval(), USickData::setTime(), USmlSource::skipToEndTag(), testImageHandling(), testImageLoadSave(), testMatrixVecBig(), testTime(), testTime2(), testZlib(), ULaserDevice::threadRunLoop(), UClientHandler::threadRunLoop(), ULogFile::toLog(), USmrCl::toLog(), toLogGmk(), UImage::UImage(), ULaserSim::ULaserSim(), and UV360Scan::update().

void UTime::now ( )
inline

Set time value to system time now using gettimeofday()

References SetTime(), setTime(), time, and valid.

Referenced by UResPoseHist::addPoseHist(), UFuncKinect::callGotNewDataWithObject(), UVarLog::changed(), UHokuyo::closePort(), UResIf::connectionChange(), UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UResObj3d::do3dVoxels(), UResSmrIf::eventGpsUpdate(), UResSmrIf::eventInsUpdate(), UCmdExe::executeFunction(), UImgPush::fillBuffer(), UImgPush::fillShowBuffer(), UAvoidPath2::findObstAvoidRoute(), UAvoidPath2::findRoutes(), ULaserDevice::getFakeScan(), UResMapObst::getNearObstacles(), UServerPushQueue::getNextExeTime(), UResCamIfCam::gotNewData(), UResNavIfMan::gotNewData(), UResSmrIf::gotUserEvent(), UFuncView::handleCommand(), UFuncPoly::handleCommand(), UFuncPcp::handleCommand(), UClientFuncGmk::handleGmkGet(), UFunctionImgPool::handleImageGetCommand(), UResPcp::handleNewData(), UResPoly::handleNewData(), UCmdExe::handleOneMessageFromQueue(), UResCron::handleOnePushCmd(), UCmdExe::handleOneServerPushMessage(), UResLaserIfSf::handleSF(), UImage::imgUpdated(), UServerClient::initConnection(), UResIf::interfaceAlive(), UResIf::interfaceAliveTag(), UResIf::interfaceTick(), UCmdExe::killServer(), UVarPool::listVars(), UCmdExe::loadFunctionModule(), UServerClient::logWrite(), UAvoidCellGraph::makeCellDecomposition(), UResRuleState::methodCallV(), UMisRuleState::methodWait(), UHokuyo::openPort(), UNavPaint::paint(), UGpsLatLong::parseGPGGA(), UFuncTOF::processImages(), ULms100::receiveData(), ULms500::receiveData(), UHokuyo::receiveFromDevice(), UFuncPTgrey::Receiver(), UFuncTOF::Receiver(), URawServerPort::run(), UFuncImu::run(), UFuncView::run(), UResRhdIf::run(), UFuncPiCam::run(), UResCron::run(), UFuncKinect::run(), UCmdExe::run(), USmrCl::run(), UFuncTOF::runData(), UCronJob::runJob(), UFuncTOF::runSetting(), UClientFuncLaserGui::saveImage(), USmrCl::saveMrcLog(), UVariable::saveToLog(), UFunctionAvoid::sendManSeq(), UResSmrCtl::sendNewManoeuvreToSMR(), UHokuyo::sendToDevice(), UServerPort::serverIsAlive(), UServerPort::serviceClients(), UResLocater::set_state(), UServerInMsg::setMessage(), UVariable::setTimeNow(), UPolyItem::setUpdated(), UPcpItem::setUpdated(), UVariable::setUpdated(), testVar(), testVideo3(), UKeepItem::tick(), UResGps::toLog(), UClientPort::tryConnect(), UFuncPiPi::UFuncPiPi(), UFuncKinect::updateCloud(), UFuncV4lGst::useBuffer(), UServerPort::UServerPort(), UTimeNow::UTimeNow(), UCamDevGuppy::~UCamDevGuppy(), and UCamDevIeee1394::~UCamDevIeee1394().

bool UTime::operator!= ( UTime  other)
inline

Compare two times

UTime UTime::operator+ ( double  seconds)

Add a number of seconds to this time

References add().

Referenced by operator-().

void UTime::operator+= ( double  seconds)
inline

Add a number of decimal seconds to this time.

References add().

double UTime::operator- ( UTime  old)
inline

Subtract two UTime values and get result in decimal seconds

References GetDecSec(), and operator+().

UTime UTime::operator- ( double  seconds)

sub a number of seconds to this time

References sub().

void UTime::operator-= ( double  seconds)
inline

Add a number of decimal seconds to this time.

References add(), and sub().

bool UTime::operator< ( UTime  other)
inline

Compare two times

References time.

bool UTime::operator< ( double  other)
inline

Compare two times, where other is a double float

References getDecSec().

bool UTime::operator<= ( double  other)
inline

Compare two times, where other is a double float

References getDecSec().

bool UTime::operator<= ( UTime  other)
inline

Compare two times

bool UTime::operator== ( UTime  other)
inline

Compare two times

References time.

bool UTime::operator> ( UTime  other)
inline

Compare two times

References time.

bool UTime::operator> ( double  other)
inline

Compare two times, where other is a double float

References getDecSec().

bool UTime::operator>= ( UTime  other)
inline

Compare two times

bool UTime::operator>= ( double  other)
inline

Compare two times, where other is a double float

References getDecSec().

void UTime::print ( const char *  prestring = NULL)
inline

print date and time on console

References getAsSml(), and show().

Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UProbPoly::print(), and testTime2().

int UTime::SaveToReg ( Uconfig ini,
const char *  subject,
const char *  key 
)

Save time value to microseconf to config file

References GetMicrosec(), GetSec(), and Uconfig::strPut().

Referenced by getJustSec().

void UTime::SetTime ( timeval  iTime)

Set time from a timeval structure

References time, and valid.

Referenced by UFuncKinect::callGotNewDataWithObject(), now(), SetTime(), setTime(), and testTime().

void UTime::setTime ( double  decimalSec)
void UTime::SetTime ( double  decimalSec)
inline

References SetTime(), and setTime().

void UTime::SetTime ( long  sec,
long  uSec 
)

Set time using seconds and microseconds.

References time, and valid.

void UTime::setTime ( long  sec,
long  uSec 
)
inline

References SetTime(), setTimeTod(), and setTimeU().

void UTime::SetTime ( int  year,
int  month,
int  day,
int  hour = 0,
int  min = 0,
int  sec = 0,
long  usec = 0 
)
inline

Set time from date.

References getDateTimeAsString(), getForFilename(), GetTimeAsString(), min, and setTime().

void UTime::setTime ( int  year,
int  month,
int  day,
int  hour = 0,
int  min = 0,
int  sec = 0,
long  usec = 0 
)

Set time from date.

References min, time, and valid.

void UTime::setTimeTod ( const char *  tod)
void UTime::setTimeU ( unsigned long  sec,
unsigned long  uSec 
)

Set time using unsigned values

References time, and valid.

Referenced by UVariable::decodeReplayLine(), USmlTag::getPoseT(), setTime(), and UCamDevIeee1394::~UCamDevIeee1394().

void UTime::show ( const char *  prestring = NULL)

Show date and time on console

References getDateString(), getTimeAsString(), and time.

Referenced by getTimeval(), and print().

void UTime::sub ( double  seconds)

Subtract a number of seconds from this time. Can not handle negative time, and seconds must be positive.

References time.

Referenced by operator-(), and operator-=().

Member Data Documentation

timeval UTime::time
bool UTime::valid

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