MRPT  2.0.1
Classes | Namespaces | Macros | Typedefs | Functions
datetime.h File Reference
#include <mrpt/core/Clock.h>
#include <mrpt/core/exceptions.h>
#include <cstdint>
#include <iosfwd>
#include <string>
Include dependency graph for datetime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mrpt::system::TTimeParts
 The parts of a date/time (it's like the standard 'tm' but with fractions of seconds). More...
 

Namespaces

 mrpt::system
 

Macros

#define INVALID_TIMESTAMP   mrpt::Clock::time_point()
 Represents an invalid timestamp, where applicable. More...
 

Typedefs

using mrpt::system::TTimeStamp = mrpt::Clock::time_point
 A system independent time type, it holds the the number of 100-nanosecond intervals since January 1, 1601 (UTC) as a mrpt::Clock::time_point (uint64_t). More...
 

Functions

mrpt::system::TTimeStamp mrpt::system::buildTimestampFromParts (const mrpt::system::TTimeParts &p)
 Builds a timestamp from the parts (Parts are in UTC) More...
 
mrpt::system::TTimeStamp mrpt::system::buildTimestampFromPartsLocalTime (const mrpt::system::TTimeParts &p)
 Builds a timestamp from the parts (Parts are in local time) More...
 
void mrpt::system::timestampToParts (TTimeStamp t, TTimeParts &p, bool localTime=false)
 Gets the individual parts of a date/time (days, hours, minutes, seconds) - UTC time or local time. More...
 
mrpt::system::TTimeStamp mrpt::system::getCurrentTime ()
 Returns the current (UTC) system time. More...
 
mrpt::system::TTimeStamp mrpt::system::now ()
 A shortcut for system::getCurrentTime. More...
 
mrpt::system::TTimeStamp mrpt::system::time_tToTimestamp (const double t)
 Transform from standard "time_t" (actually a double number, it can contain fractions of seconds) to TTimeStamp. More...
 
mrpt::system::TTimeStamp mrpt::system::time_tToTimestamp (const time_t &t)
 Transform from standard "time_t" to TTimeStamp. More...
 
double mrpt::system::timestampTotime_t (const mrpt::system::TTimeStamp t) noexcept
 Transform from TTimeStamp to standard "time_t" (actually a double number, it can contain fractions of seconds). More...
 
double mrpt::system::timestampToDouble (const mrpt::system::TTimeStamp t) noexcept
 Transform from TTimeStamp to standard "time_t" (actually a double number, it can contain fractions of seconds). More...
 
double mrpt::system::timeDifference (const mrpt::system::TTimeStamp t_first, const mrpt::system::TTimeStamp t_later)
 Returns the time difference from t1 to t2 (positive if t2 is posterior to t1), in seconds. More...
 
double mrpt::system::now_double ()
 Returns the current time, as a double (fractional version of time_t) instead of a TTimeStamp. More...
 
mrpt::system::TTimeStamp mrpt::system::timestampAdd (const mrpt::system::TTimeStamp tim, const double num_seconds)
 Shifts a timestamp the given amount of seconds (>0: forwards in time, <0: backwards) More...
 
std::string mrpt::system::formatTimeInterval (const double timeSeconds)
 Returns a formated string with the given time difference (passed as the number of seconds), as a string [H]H:MM:SS.MILLISECONDS. More...
 
std::string mrpt::system::dateTimeToString (const mrpt::system::TTimeStamp t)
 Convert a timestamp into this textual form (UTC time): YEAR/MONTH/DAY,HH:MM:SS.MMM. More...
 
std::string mrpt::system::dateTimeLocalToString (const mrpt::system::TTimeStamp t)
 Convert a timestamp into this textual form (in local time): YEAR/MONTH/DAY,HH:MM:SS.MMM. More...
 
std::string mrpt::system::dateToString (const mrpt::system::TTimeStamp t)
 Convert a timestamp into this textual form: YEAR/MONTH/DAY. More...
 
double mrpt::system::extractDayTimeFromTimestamp (const mrpt::system::TTimeStamp t)
 Returns the number of seconds ellapsed from midnight in the given timestamp. More...
 
std::string mrpt::system::timeToString (const mrpt::system::TTimeStamp t)
 Convert a timestamp into this textual form (UTC): HH:MM:SS.MMMMMM. More...
 
std::string mrpt::system::timeLocalToString (const mrpt::system::TTimeStamp t, unsigned int secondFractionDigits=6)
 Convert a timestamp into this textual form (in local time): HH:MM:SS.MMMMMM. More...
 
std::string mrpt::system::intervalFormat (const double seconds)
 This function implements time interval formatting: Given a time in seconds, it will return a string describing the interval with the most appropriate unit. More...
 
std::ostream & mrpt::system::operator<< (std::ostream &o, const TTimeStamp &t)
 Textual representation of a TTimeStamp as the plain number in time_since_epoch().count() More...
 



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020