MRPT  1.9.9
mrpt::Clock Class Reference

Detailed Description

Clock that is compatible with MRPT TTimeStamp representation.

Definition at line 19 of file Clock.h.

#include <mrpt/core/Clock.h>

Public Types

using rep = int64_t
 
using period = std::ratio< 1, 10000000 >
 
using duration = std::chrono::duration< rep, period >
 
using time_point = std::chrono::time_point< Clock >
 

Static Public Member Functions

static time_point now () noexcept
 Returns the current time, with the highest resolution available. More...
 
static time_point fromDouble (const double t) noexcept
 Create a timestamp from its double representation. More...
 
static double toDouble (const time_point t) noexcept
 Converts a timestamp to a UNIX time_t-like number, with fractional part. More...
 

Static Public Attributes

static constexpr bool is_steady = std::chrono::system_clock::is_steady
 

Member Typedef Documentation

◆ duration

using mrpt::Clock::duration = std::chrono::duration<rep, period>

Definition at line 25 of file Clock.h.

◆ period

using mrpt::Clock::period = std::ratio<1, 10000000>

Definition at line 24 of file Clock.h.

◆ rep

Definition at line 22 of file Clock.h.

◆ time_point

using mrpt::Clock::time_point = std::chrono::time_point<Clock>

Definition at line 26 of file Clock.h.

Member Function Documentation

◆ fromDouble()

mrpt::Clock::time_point mrpt::Clock::fromDouble ( const double  t)
staticnoexcept

Create a timestamp from its double representation.

See also
toDouble

Definition at line 51 of file Clock.cpp.

Referenced by mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::readGTFile(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::readGTFileRGBD_TUM(), TEST(), and mrpt::system::time_tToTimestamp().

Here is the caller graph for this function:

◆ now()

mrpt::Clock::time_point mrpt::Clock::now ( )
staticnoexcept

Returns the current time, with the highest resolution available.

Typically this is better than 1 microsecond.

Definition at line 46 of file Clock.cpp.

References getCurrentTime().

Referenced by mrpt::system::CTimeLoggerEntry::CTimeLoggerEntry(), mrpt::system::getCurrentTime(), mrpt::slam::CMetricMapBuilderICP::initialize(), mrpt::system::now(), mrpt::system::CTimeLoggerEntry::stop(), and TEST().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toDouble()

double mrpt::Clock::toDouble ( const time_point  t)
staticnoexcept

Converts a timestamp to a UNIX time_t-like number, with fractional part.

See also
fromDouble

Definition at line 58 of file Clock.cpp.

Referenced by mrpt::system::timestampTotime_t().

Here is the caller graph for this function:

Member Data Documentation

◆ is_steady

constexpr bool mrpt::Clock::is_steady = std::chrono::system_clock::is_steady
static

Definition at line 28 of file Clock.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019