stateObservation::tools::SimplestStopwatch Struct Reference

#include <state-observation/tools/definitions.hpp>

Public Types

using clock = typename std::conditional< std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock >::type
 
using time_ns = clock::time_point
 

Public Member Functions

void start ()
 
double stop ()
 

Public Attributes

time_ns startTime
 

Member Typedef Documentation

◆ clock

using stateObservation::tools::SimplestStopwatch::clock = typename std::conditional<std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock>::type

Always pick a steady clock

◆ time_ns

Member Function Documentation

◆ start()

void stateObservation::tools::SimplestStopwatch::start ( )
inline

◆ stop()

double stateObservation::tools::SimplestStopwatch::stop ( )
inline

provides the time since the start the value is in nanoseconds

Member Data Documentation

◆ startTime

time_ns stateObservation::tools::SimplestStopwatch::startTime

The documentation for this struct was generated from the following file: