DUNE: Uniform Navigational Environment  2020.01.0
DUNE::Time::Clock Class Reference

Detailed Description

System clock routines.

Static Public Member Functions

static uint64_t getNsec (void)
 
static uint64_t getUsec (void)
 
static uint64_t getMsec (void)
 
static double get (void)
 
static uint64_t getSinceEpochNsec (void)
 
static uint64_t getSinceEpochUsec (void)
 
static uint64_t getSinceEpochMsec (void)
 
static double getSinceEpoch (void)
 
static void set (double value)
 
static void setTimeMultiplier (double mul)
 
static double getTimeMultiplier ()
 
static double getStartTimeEpoch ()
 
static double getStartTimeMono ()
 
static uint64_t getSinceEpochNsecRT (void)
 
static uint64_t getNsecRT (void)
 
static double getSinceEpochRT (void)
 
static double getRT (void)
 
static double toSimTime (double timestamp)
 

Member Function Documentation

static double DUNE::Time::Clock::get ( void  )
inlinestatic

Get the amount of non-realtime (in seconds) since an unspecified point in the past.

If the system permits, this point does not change after system start-up time.

Returns
time in seconds.

References getNsec(), and getSinceEpochNsec().

Referenced by DUNE::Math::Random::Generator::arbitrarySeed(), DUNE::Time::Delta::check(), DUNE::Control::BasicRemoteOperation::consume(), DUNE::Tasks::MessageFilter::filter(), DUNE::Network::FragmentedMessage::getAge(), DUNE::Time::Delta::getDelta(), DUNE::Time::Counter< float >::getElapsed(), DUNE::Time::Counter< float >::getRemaining(), Transports::IridiumSBD::TxRequest::hasExpired(), DUNE::Control::BottomTracker::onEstimatedState(), DUNE::Control::BasicRemoteOperation::onResourceInitialization(), Simulators::StreamVelocity::Task::onResourceInitialization(), DUNE::Time::Counter< float >::overflow(), DUNE::Tasks::Periodic::Periodic(), DUNE::Time::Delta::reset(), DUNE::Time::Counter< float >::reset(), DUNE::Control::BottomTracker::reset(), DUNE::Monitors::ServoCurrentMonitor< T >::ServoCurrentMonitor(), DUNE::Network::FragmentedMessage::setFragment(), DUNE::Maneuvers::StationKeep::StationKeep(), Transports::IridiumSBD::TxRequest::TxRequest(), Control::ROV::RemoteOperation::DistanceTracking::update(), DUNE::Monitors::DelayedTrigger< Tc >::updateAndTest(), DUNE::Monitors::ServoCurrentMonitor< T >::updateAndTest(), DUNE::Monitors::ServoPositionMonitor< T >::updateAndTest(), Simulators::StreamVelocity::Task::updateMessage(), DUNE::Maneuvers::StationKeep::updatePathControl(), and DUNE::Concurrency::Condition::wait().

static uint64_t DUNE::Time::Clock::getMsec ( void  )
inlinestatic

Get the amount of non-realtime (in milliseconds) since an unspecified point in the past.

If the system permits, this point does not change after system start-up time.

Returns
time in milliseconds.

References getNsec().

uint64_t DUNE::Time::Clock::getNsec ( void  )
static

Get the amount of non-realtime (in nanoseconds) since an unspecified point in the past.

If the system permits, this point does not change after system start-up time.

Returns
time in nanoseconds.

References getNsecRT().

Referenced by DUNE::Tasks::Context::Context(), get(), getMsec(), getUsec(), DUNE::Time::PeriodicDelay::reset(), and DUNE::Time::PeriodicDelay::wait().

uint64_t DUNE::Time::Clock::getNsecRT ( void  )
static

Get the amount of realtime (in nanoseconds) since an unspecified point in the past.

If the system permits, this point does not change after system start-up time.

Returns
time in nanoseconds.

References getSinceEpochNsec().

Referenced by getNsec(), getRT(), getStartTimeMono(), and setTimeMultiplier().

static double DUNE::Time::Clock::getRT ( void  )
inlinestatic

Get the amount of realtime (in seconds) since an unspecified point in the past.

If the system permits, this point does not change after system start-up time.

Returns
time in seconds.

References getNsecRT(), and toSimTime().

Referenced by DUNE::Concurrency::Condition::wait().

static double DUNE::Time::Clock::getSinceEpoch ( void  )
inlinestatic

Get the amount of non-realtime (in seconds) elapsed since the UNIX Epoch (Midnight UTC of January 1, 1970).

Returns
time in seconds.

References getSinceEpochNsec(), getTimeMultiplier(), and setTimeMultiplier().

Referenced by DUNE::Concurrency::SharedMemory::open(), DUNE::Navigation::BasicNavigation::reportToBus(), DUNE::IMC::Message::setTimeStamp(), DUNE::Tasks::Task::spew(), and DUNE::Concurrency::Condition::wait().

static uint64_t DUNE::Time::Clock::getSinceEpochMsec ( void  )
inlinestatic

Get the amount of non-realtime (in milliseconds) elapsed since the UNIX Epoch (Midnight UTC of January 1, 1970).

Returns
time in milliseconds.

References getSinceEpochNsec().

uint64_t DUNE::Time::Clock::getSinceEpochNsec ( void  )
static

Get the amount of non-realtime (in nanoseconds) elapsed since the UNIX Epoch (Midnight UTC of January 1, 1970).

Returns
time in nanoseconds.

References getSinceEpochNsecRT().

Referenced by get(), getNsecRT(), getSinceEpoch(), getSinceEpochMsec(), and getSinceEpochUsec().

uint64_t DUNE::Time::Clock::getSinceEpochNsecRT ( void  )
static

Get the amount of realtime (in nanoseconds) elapsed since the UNIX Epoch (Midnight UTC of January 1, 1970).

Returns
time in nanoseconds.

Referenced by getSinceEpochNsec(), getSinceEpochRT(), getStartTimeMono(), and setTimeMultiplier().

static double DUNE::Time::Clock::getSinceEpochRT ( void  )
inlinestatic

Get the amount of realtime (in seconds) elapsed since the UNIX Epoch (Midnight UTC of January 1, 1970).

Returns
time in seconds.

References getSinceEpochNsecRT().

Referenced by DUNE::Concurrency::Condition::wait().

static uint64_t DUNE::Time::Clock::getSinceEpochUsec ( void  )
inlinestatic

Get the amount of non-realtime (in microseconds) elapsed since the UNIX Epoch (Midnight UTC of January 1, 1970).

Returns
time in microseconds.

References getSinceEpochNsec().

static double DUNE::Time::Clock::getStartTimeEpoch ( )
inlinestatic

Return reference time used for epoch clock acceleration.

Returns
s_starttime_epoch epoch time reference
static double DUNE::Time::Clock::getStartTimeMono ( )
inlinestatic

Return reference time used for monotonic clock acceleration.

Returns
s_starttime_epoch epoch time reference

References getNsecRT(), and getSinceEpochNsecRT().

double DUNE::Time::Clock::getTimeMultiplier ( void  )
static

Return configured time multipler.

Returns
simulation time multiplier (1.0 for real-time)

Referenced by getSinceEpoch(), DUNE::Time::PeriodicDelay::set(), DUNE::Concurrency::Condition::wait(), and DUNE::Time::Delay::wait().

static uint64_t DUNE::Time::Clock::getUsec ( void  )
inlinestatic

Get the amount of non-realtime (in microseconds) since an unspecified point in the past.

If the system permits, this point does not change after system start-up time.

Returns
time in microseconds.

References getNsec().

void DUNE::Time::Clock::set ( double  value)
static

Set current time in the form of seconds elapsed since the UNIX Epoch (Midnight UTC of January 1, 1970).

Parameters
valuetime in seconds.

References setTimeMultiplier().

void DUNE::Time::Clock::setTimeMultiplier ( double  mul)
static

Time multiplier for non-realtime simulations.

Parameters
mulmultiplier (e.g. 4.0 for 4x speed)

References getNsecRT(), and getSinceEpochNsecRT().

Referenced by getSinceEpoch(), and set().

double DUNE::Time::Clock::toSimTime ( double  timestamp)
static

Referenced by getRT().

Collaboration diagram for DUNE::Time::Clock:
Collaboration graph