AURobotServers
4
|
#include <utime.h>
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 |
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.
UTime::UTime | ( | ) |
Constructor
References clear().
UTime::~UTime | ( | ) |
Destructor
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 | ) |
Clear to 0.0
Referenced by UFeatureData::clear(), USFData::clear(), UPoseTVQ::clear(), UVarPool::getLocalValueTime(), UFuncPoly::handleCommand(), UFuncPcp::handleCommand(), UResNavIfMan::handleManData(), UClientFuncLaser::handlePath(), UNavPaint::paintOdoDataText(), UNavView::paintOdoDataText(), UVarHist::setHistSize(), UResIf::setReplay(), UPaintPcp::UPaintPcp(), UPcpItem::UPcpItem(), UPolyItem::UPolyItem(), and UTime().
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 |
||
) |
Get date on format "day month year", e.g. "22 Jun 2003".
References time.
Referenced by UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), getDateString(), getTimeAsString(), UCmdExe::handleServerCommand(), and testTime().
|
inline |
Same as above, but with different spelling
References GetDateString(), and isLeapYear().
Referenced by UFunctionPoseHist::handlePoseHistCommand(), UVarPool::listVars(), UClientFuncLaserGui::paintOdoData(), UNavPaint::paintOdoDataText(), UNavView::paintOdoDataText(), and show().
char * UTime::getDateTimeAsString | ( | char * | info, |
bool | local = true |
||
) |
Writes time to INFO in format "yyyy-MM-dd hh:mm:ss.msec"
info | is a bugger for the string, must be at least 24 characters long. |
local | should time be in local time (else UTM if set on computer) |
References GetMilisec(), and time.
Referenced by UResLaserIfObst::listGroups(), UNavPaint::printRefSystems(), UNavView::printRefSystems(), and SetTime().
int UTime::GetDayInMonth | ( | ) |
int UTime::GetDayInYear | ( | ) |
long UTime::GetDaySerial | ( | ) |
double UTime::GetDecSec | ( | ) |
Get second value with microsecond as decimals
Referenced by add(), getDecSec(), getMicrosec(), UFuncPpl::handleCommand(), UFuncLinefinder::houghTest(), operator-(), UCamPwc::readFramesThread(), UCamDevice::readFramesThread(), and UResV360::update().
|
inline |
References GetDecSec(), and getTimePassed().
Referenced by UFuncBallKL::findBall(), UFuncPiPi::findBall(), UFuncBall::findBall(), UFuncBall_improved::findBall(), UResRoseBot::findRows(), UVarHist::getTimeVector(), UVarHist::getVectorToTime(), UResNavIfMan::gotNewData(), UFuncLobst::handleCommand(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UServerInQueue::list(), UVarPool::listVars(), UResSmrIf::methodCall(), UResRuleState::methodCallV(), operator<(), operator<=(), operator>(), operator>=(), UClientFuncLaserGui::paintOdoData(), UNavPaint::paintOdoDataText(), UNavView::paintOdoDataText(), UResSmrCtl::sendNewManoeuvreToSMR(), USmrCl::setDriveState(), UVariable::setPose(), UVariable::setTime(), UVariable::setTimeNow(), UFuncLobst::testMethodCall(), updateDisplacement(), UFuncLoca2::updateDisplacement(), and UResPoseHist::updateVarPool().
char * UTime::getForFilename | ( | char * | info, |
bool | local = true |
||
) |
Writes time to INFO in format "yyyyMMdd_hhmmss.msec"
info | is a bugger for the string, must be at least 19 characters long. |
local | should time be in local time (else UTM if set on computer) |
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().
|
inline |
Get number of seconds within last minute in range 0..59
References time.
Referenced by UCalibrationMarkSet::evaluateChartPosRot(), and testTime().
|
inline |
References GetDaySerial(), GetHour(), GetMin(), LoadFromReg(), SaveToReg(), and time.
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 | ( | ) |
Get microsecond value within second in range 0..999999
Referenced by UFuncCropRow::findPlants(), getMicrosec(), getMilisec(), UFunctionCam::handleCamSetCommand(), UFuncCropRow::handleCommand(), UFuncLoca2::handleLocalize(), UResLocater::locate(), UFuncKinect::run(), SaveToReg(), UFunctionImgBase::sendImage(), and testTime().
|
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
Referenced by getDateTimeAsString(), getForFilename(), getMilisec(), getSec(), GetTimeAsString(), and USmrOdoState::logState().
|
inline |
References GetMicrosec(), and GetMilisec().
Referenced by UFuncEfLine::sendAllLines(), and UFuncEfLine::sendBoxLines().
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 | ( | ) |
Get time value in seconds (since 1970)
Referenced by UFuncCropRow::findPlants(), getSec(), UFuncCropRow::handleCommand(), UResLocater::locate(), UClientFuncLaserGui::paintOdoData(), UFuncKinect::run(), UFuncTOF::runData(), UFuncTOF::runSetting(), SaveToReg(), UFuncEfLine::sendAllLines(), UFuncEfLine::sendBoxLines(), UFunctionPassable::sendFullScan(), UFunctionImgBase::sendImage(), UFunctionLaser::sendScan(), and UFunctionVarPool::sendVar().
|
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"
info | destination buffer, must be at least 13 characters long |
local | converts 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().
|
inline |
Writes time to INFO in format "hh:mm:ss.msec"
info | destination buffer, must be at least 13 characters long |
local | converts time to local time (is system time is UTM or somthing) |
References GetDateString(), GetDayInMonth(), GetDayInYear(), GetMonth(), GetTimeAsString(), and GetYear().
Referenced by UFuncCog::centerOfGravity(), UCamDevGigE::frameToImage(), UPlannerValue::getAsString(), UHokuyo::getDataTo(), UCronJob::getResultStr(), URawServerPort::handleOneMessageFromQueue(), UFunctionPoseHist::handlePoseHistCommand(), UCmdExe::handleServerCommand(), UFunctionLaser::handleSetCommand(), UVarPool::listVars(), UServerClient::logWrite(), UResCamIfGmk::newDataAvailable(), UClientFuncLaserGui::paintEkfData(), UClientFuncLaserGui::paintOdoData(), UNavPaint::paintOdoDataText(), UNavView::paintOdoDataText(), UClientFuncLaserGui::paintPlannerData(), UNavPaint::paintVarDataText(), UServerClient::print(), UFunctionImgBase::sendImage(), show(), UClientCamData::snprint(), UResCamIfPath::snprint(), UResCamIfCam::snprint(), UResCamIfGmk::snprint(), UResLaserIfObst::snprint(), UResCamIfImg::snprint(), UResLaserIfSf::snprint(), UResLaserIfScan::snprint(), UResNavIfMan::snprint(), UHokuyo::toLog(), and toLogGmk().
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.
when | 'local' is true the local time is returned, else GMT. |
References time.
Referenced by UResGps::getTimeLocal(), UGpsLatLong::parseGPGGA(), and UGpsLatLong::parseGPRMC().
|
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().
|
inline |
Set time value to system time now using gettimeofday()
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().
|
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().
|
inline |
Compare two times
UTime UTime::operator+ | ( | double | seconds | ) |
|
inline |
Add a number of decimal seconds to this time.
References add().
|
inline |
Subtract two UTime values and get result in decimal seconds
References GetDecSec(), and operator+().
|
inline |
|
inline |
Compare two times, where other is a double float
References getDecSec().
|
inline |
Compare two times, where other is a double float
References getDecSec().
|
inline |
Compare two times
|
inline |
Compare two times, where other is a double float
References getDecSec().
|
inline |
Compare two times
|
inline |
Compare two times, where other is a double float
References getDecSec().
|
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
Referenced by UFuncKinect::callGotNewDataWithObject(), now(), SetTime(), setTime(), and testTime().
void UTime::setTime | ( | double | decimalSec | ) |
Set time from double decimal second value (less precise (about 1 ms)). NB! This may not allow full precition.
Referenced by add(), UResDrivePos::driveOdo(), UResRoadDrive::driveSide(), USmrCl::eventInsUpdate(), UResAvoid::findPathToHere(), UPlannerValue::getAsString(), UVarPool::getGlobalValue(), UFunctionCamPath::getImageName(), UImgProj::getImageName(), UImgPolyProj::getImageName(), UVarPool::getLocalValue(), UVarPool::getLocalValueTime(), UFunctionCamPath::getRobotPose(), UVariable::getTime(), UPoseHistNotUsed::getTimeAtDistance(), UResPoseHist::getTimeAtDistance(), UResGps::getTimeLocal(), USmlTag::getTimeofday(), UClientFuncLaser::handleEkf(), UClientFuncImage::handleImages(), UFunctionImgPool::handleImageSetCommand(), UClientFuncSimScan::handleLaserScan(), UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UClientFuncLaser::handleOdo(), UClientHandler::handlePingReply(), UFunctionPoseHist::handlePoseHistCommand(), UFuncLocalize::handleResetLocalizer(), UVarPool::listVars(), UResPoseHist::methodCall(), now(), UImgProj::paintPath(), UImgPolyProj::paintPath(), UClientFuncLaserGui::paintPlannerData(), UNavPaint::paintVarDataText(), UServerClient::sendPingReply(), UFunctionVarPool::sendVar(), UPlannerValue::setFromTag(), SetTime(), setTimeTod(), UResLaserIfSf::snprint(), UFuncLocalize::UFuncLocalize(), UResPoseHist::UResPoseHist(), and UCamDevGuppy::~UCamDevGuppy().
void UTime::SetTime | ( | long | sec, |
long | uSec | ||
) |
|
inline |
References SetTime(), setTimeTod(), and setTimeU().
|
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 |
||
) |
void UTime::setTimeTod | ( | const char * | tod | ) |
Set time from a time of day string, i.e. 12345678.067877. The functions acceps any number of decimals, i.e. 6 decimals or less. Sets time invalid if no decimal point is found.
References setTime(), and valid.
Referenced by UFuncKinect::decodeReplayLine(), UImagePool::decodeReplayLine(), UCamPool::decodeReplayLine(), UResNavIfMan::handleManData(), UResLaserIfObst::handleObst(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UClientFuncLaser::handlePath(), UFunctionPoseHist::handlePoseHistCommand(), UClientFuncSF::handleRoad(), UResLaserIfSf::handleRoad(), UCmdExe::handleServerCommand(), UFunctionLaser::handleSetCommand(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UReplay::replayStep(), UReplayDevice::replayStep(), UPoseHistNotUsed::replayStep(), UResPoseHist::replayStep(), UResGps::run(), UClientManSeq::setFromTag(), UReplayDevice::setReplay(), UReplay::setReplay(), UPoseHistNotUsed::setReplay(), UResPoseHist::setReplay(), and setTime().
void UTime::setTimeU | ( | unsigned long | sec, |
unsigned long | uSec | ||
) |
Set time using unsigned values
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-=().
timeval UTime::time |
Time as 'timeval' - i.e. same format as in 'timeofday' call.
Referenced by clear(), getAsSml(), GetDateString(), getDateTimeAsString(), GetDaySerial(), GetDecSec(), getForFilename(), GetHour(), GetJustSec(), getJustSec(), GetMicrosec(), GetMilisec(), GetMin(), GetMonth(), GetSec(), GetTimeAsString(), getTimeTm(), getTimeval(), GetYear(), LoadFromReg(), Now(), now(), operator<(), operator==(), operator>(), SetTime(), setTime(), setTimeU(), show(), sub(), and USemaphore::wait().
bool UTime::valid |
A valid flag, that are used when setting the time
Referenced by clear(), UCamPool::decodeReplayLine(), UVariable::decodeReplayLine(), GetDecSec(), GetMicrosec(), GetMilisec(), GetSec(), UFuncLoca2::handleCommand(), UFunctionPoseHist::handlePoseHistCommand(), UFunctionLaser::handleSetCommand(), UServerInQueue::list(), LoadFromReg(), Now(), now(), UReplay::replayStep(), UReplayDevice::replayStep(), UPoseHistNotUsed::replayStep(), UResPoseHist::replayStep(), UResGps::run(), UVarPool::setLocalVar(), UReplayDevice::setReplay(), UReplay::setReplay(), UPoseHistNotUsed::setReplay(), UResPoseHist::setReplay(), SetTime(), setTime(), setTimeTod(), setTimeU(), and UFuncLoca2::UFuncLoca2().