OpenDaVINCI  4.16.0
odcontext::base::ControlledTime Class Reference

#include <ControlledTime.h>

Inheritance diagram for odcontext::base::ControlledTime:
Inheritance graph

Public Member Functions

 ControlledTime ()
 
 ControlledTime (const uint32_t &s, const uint32_t &ps)
 
 ControlledTime (const ControlledTime &ct)
 
virtual ~ControlledTime ()
 
ControlledTimeoperator= (const ControlledTime &ct)
 
virtual int32_t getSeconds () const
 
virtual int32_t getPartialMicroseconds () const
 
void setSeconds (const int32_t &s)
 
void setPartialMicroseconds (const int32_t &partialMS)
 

Detailed Description

This class provides a controlled time.

Constructor & Destructor Documentation

odcontext::base::ControlledTime::ControlledTime ( )
odcontext::base::ControlledTime::ControlledTime ( const uint32_t &  s,
const uint32_t &  ps 
)

Constructor.

Parameters
sSeconds.
psPartial microseconds.
odcontext::base::ControlledTime::ControlledTime ( const ControlledTime ct)

Copy constructor.

Parameters
ctObject from same class.
odcontext::base::ControlledTime::~ControlledTime ( )
virtual

Member Function Documentation

int32_t odcontext::base::ControlledTime::getPartialMicroseconds ( ) const
virtual

This method returns the partial microseconds from the next full second.

Returns
Partial microseconds from the next full second.

Implements odcore::wrapper::Time.

Referenced by odcontext::base::Clock::increment(), operator=(), and odcontext::base::ControlledTimeFactory::setTime().

int32_t odcontext::base::ControlledTime::getSeconds ( ) const
virtual

This method returns the seconds since Jan. 1, 1970.

Returns
Seconds since Jan. 1, 1970.

Implements odcore::wrapper::Time.

Referenced by odcontext::base::Clock::increment(), operator=(), and odcontext::base::ControlledTimeFactory::setTime().

ControlledTime & odcontext::base::ControlledTime::operator= ( const ControlledTime ct)

Assignment operator.

Parameters
ctObject from same class.
Returns
(*this).

References getPartialMicroseconds(), getSeconds(), setPartialMicroseconds(), and setSeconds().

void odcontext::base::ControlledTime::setPartialMicroseconds ( const int32_t &  partialMS)

This method sets the partial microseconds.

Parameters
partialMSPartial microseconds.

Referenced by odcontext::base::Clock::increment(), operator=(), and odcontext::base::ControlledTimeFactory::setTime().

void odcontext::base::ControlledTime::setSeconds ( const int32_t &  s)

This method sets the seconds.

Parameters
sSeconds.

Referenced by odcontext::base::Clock::increment(), operator=(), and odcontext::base::ControlledTimeFactory::setTime().