Embedded Multicore Building Blocks V1.0.0
Classes | Typedefs | Functions
Duration and Time

Relative time durations and absolute time points. More...

Classes

class  embb::base::Duration< Tick >
 Represents a relative time duration for a given tick type. More...
 
class  embb::base::Time
 Represents an absolute time point. More...
 

Typedefs

typedef Duration< internal::Seconds > embb::base::DurationSeconds
 Duration with seconds tick. More...
 
typedef Duration< internal::Milliseconds > embb::base::DurationMilliseconds
 Duration with milliseconds tick. More...
 
typedef Duration< internal::Microseconds > embb::base::DurationMicroseconds
 Duration with microseconds tick. More...
 
typedef Duration< internal::Nanoseconds > embb::base::DurationNanoseconds
 Duration with nanoseconds tick. More...
 

Functions

template<typename Tick >
bool embb::base::operator== (const Duration< Tick > &lhs, const Duration< Tick > &rhs)
 Compares two durations (equality). More...
 
template<typename Tick >
bool embb::base::operator!= (const Duration< Tick > &lhs, const Duration< Tick > &rhs)
 Compares two durations (inequality). More...
 
template<typename Tick >
bool embb::base::operator< (const Duration< Tick > &lhs, const Duration< Tick > &rhs)
 Compares two durations (less than) More...
 
template<typename Tick >
bool embb::base::operator> (const Duration< Tick > &lhs, const Duration< Tick > &rhs)
 Compares two durations (greater than) More...
 
template<typename Tick >
bool embb::base::operator<= (const Duration< Tick > &lhs, const Duration< Tick > &rhs)
 Compares two durations (less than or equal to) More...
 
template<typename Tick >
bool embb::base::operator>= (const Duration< Tick > &lhs, const Duration< Tick > &rhs)
 Compares two durations (greater than or equal to) More...
 
template<typename Tick >
Duration< Tick > embb::base::operator+ (const Duration< Tick > &lhs, const Duration< Tick > &rhs)
 Adds two durations. More...
 

Detailed Description

Relative time durations and absolute time points.

Typedef Documentation

typedef Duration<internal::Seconds> embb::base::DurationSeconds

Duration with seconds tick.

typedef Duration<internal::Milliseconds> embb::base::DurationMilliseconds

Duration with milliseconds tick.

typedef Duration<internal::Microseconds> embb::base::DurationMicroseconds

Duration with microseconds tick.

typedef Duration<internal::Nanoseconds> embb::base::DurationNanoseconds

Duration with nanoseconds tick.

Function Documentation

template<typename Tick >
bool embb::base::operator== ( const Duration< Tick > &  lhs,
const Duration< Tick > &  rhs 
)

Compares two durations (equality).

Returns
true if lhs is equal to rhs, otherwise false
Parameters
[in]lhsLeft-hand side of equality operator
[in]rhsRight-hand side of equality operator
template<typename Tick >
bool embb::base::operator!= ( const Duration< Tick > &  lhs,
const Duration< Tick > &  rhs 
)

Compares two durations (inequality).

Returns
true if lhs is not equal to rhs, otherwise false
Parameters
[in]lhsLeft-hand side of inequality operator
[in]rhsRight-hand side of inequality operator
template<typename Tick >
bool embb::base::operator< ( const Duration< Tick > &  lhs,
const Duration< Tick > &  rhs 
)

Compares two durations (less than)

Returns
true if lhs is shorter than rhs.
Parameters
[in]lhsLeft-hand side of less than operator
[in]rhsRight-hand side of less than operator
template<typename Tick >
bool embb::base::operator> ( const Duration< Tick > &  lhs,
const Duration< Tick > &  rhs 
)

Compares two durations (greater than)

Returns
true if lhs is longer than rhs.
Parameters
[in]lhsLeft-hand side of greater than operator
[in]rhsRight-hand side of greater than operator
template<typename Tick >
bool embb::base::operator<= ( const Duration< Tick > &  lhs,
const Duration< Tick > &  rhs 
)

Compares two durations (less than or equal to)

Returns
true if lhs is shorter than or equal to rhs.
Parameters
[in]lhsLeft-hand side of less than or equal to operator
[in]rhsRight-hand side of less than or equal to operator
template<typename Tick >
bool embb::base::operator>= ( const Duration< Tick > &  lhs,
const Duration< Tick > &  rhs 
)

Compares two durations (greater than or equal to)

Returns
true if lhs is longer than or equal to rhs.
Parameters
[in]lhsLeft-hand side of greater than or equal to operator
[in]rhsRight-hand side of greater than or equal to operator
template<typename Tick >
Duration<Tick> embb::base::operator+ ( const Duration< Tick > &  lhs,
const Duration< Tick > &  rhs 
)

Adds two durations.

Returns
Sum of lhs and rhs.
Parameters
[in]lhsLeft-hand side of addition operator
[in]rhsRight-hand side of addition operator