Embedded Multicore Building Blocks V1.0.0
|
Represents a relative time duration for a given tick type. More...
#include <duration.h>
Public Member Functions | |
Duration () | |
Constructs a duration of length zero. More... | |
Duration (unsigned long long ticks) | |
Constructs a duration with given number of ticks. More... | |
Duration (const Duration< Tick > &to_copy) | |
Constructs a duration by copying from an existing duration. More... | |
Duration< Tick > & | operator= (const Duration< Tick > &to_assign) |
Assigns an existing duration. More... | |
unsigned long long | Count () const |
Returns the number of ticks of the duration. More... | |
Duration< Tick > & | operator+= (const Duration< Tick > &rhs) |
Assignment by addition of another duration with same tick type. More... | |
Static Public Member Functions | |
static const Duration< Tick > & | Zero () |
Returns duration of length zero. More... | |
static const Duration< Tick > & | Max () |
Returns duration with maximum ticks representable by implementation. More... | |
static const Duration< Tick > & | Min () |
Returns duration with minimum ticks representable by implementation. More... | |
Represents a relative time duration for a given tick type.
Tick | Possible tick types are Seconds, Milliseconds, Microseconds, Nanoseconds |
embb::base::Duration< Tick >::Duration | ( | ) |
Constructs a duration of length zero.
|
explicit |
Constructs a duration with given number of ticks.
[in] | ticks | Number of ticks |
embb::base::Duration< Tick >::Duration | ( | const Duration< Tick > & | to_copy | ) |
Constructs a duration by copying from an existing duration.
[in] | to_copy | Duration to copy |
|
static |
Returns duration of length zero.
|
static |
Returns duration with maximum ticks representable by implementation.
This value depends on the tick type and on the platform.
|
static |
Returns duration with minimum ticks representable by implementation.
This value depends on the tick type and on the platform.
Duration<Tick>& embb::base::Duration< Tick >::operator= | ( | const Duration< Tick > & | to_assign | ) |
Assigns an existing duration.
*this
[in] | to_assign | Duration to assign |
unsigned long long embb::base::Duration< Tick >::Count | ( | ) | const |
Returns the number of ticks of the duration.
Duration<Tick>& embb::base::Duration< Tick >::operator+= | ( | const Duration< Tick > & | rhs | ) |
Assignment by addition of another duration with same tick type.
*this
[in] | rhs | Duration to add to this duration |