|
RTEMS_INLINE_ROUTINE void | _Timestamp_Set (Timestamp_Control *_time, time_t _seconds, long _nanoseconds) |
| Set timestamp to specified seconds and nanoseconds. More...
|
|
RTEMS_INLINE_ROUTINE void | _Timestamp_Set_to_zero (Timestamp_Control *_time) |
| Sets the timestamp to zero. More...
|
|
RTEMS_INLINE_ROUTINE bool | _Timestamp_Less_than (const Timestamp_Control *_lhs, const Timestamp_Control *_rhs) |
| Less than operator for timestamps. More...
|
|
RTEMS_INLINE_ROUTINE bool | _Timestamp_Greater_than (const Timestamp_Control *_lhs, const Timestamp_Control *_rhs) |
| Greater than operator for timestamps. More...
|
|
RTEMS_INLINE_ROUTINE bool | _Timestamp_Equal_to (const Timestamp_Control *_lhs, const Timestamp_Control *_rhs) |
| Equal to than operator for timestamps. More...
|
|
RTEMS_INLINE_ROUTINE void | _Timestamp_Add_to (Timestamp_Control *_time, const Timestamp_Control *_add) |
| Adds two timestamps. More...
|
|
RTEMS_INLINE_ROUTINE void | _Timestamp_Subtract (const Timestamp_Control *_start, const Timestamp_Control *_end, Timestamp_Control *_result) |
| Subtracts two timestamps. More...
|
|
RTEMS_INLINE_ROUTINE void | _Timestamp_Divide (const Timestamp_Control *_lhs, const Timestamp_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage) |
| Divides a timestamp by another timestamp. More...
|
|
RTEMS_INLINE_ROUTINE time_t | _Timestamp_Get_seconds (const Timestamp_Control *_time) |
| Get seconds portion of timestamp. More...
|
|
RTEMS_INLINE_ROUTINE uint32_t | _Timestamp_Get_nanoseconds (const Timestamp_Control *_time) |
| Get nanoseconds portion of timestamp. More...
|
|
RTEMS_INLINE_ROUTINE uint64_t | _Timestamp_Get_as_nanoseconds (const Timestamp_Control *_time) |
| Get the timestamp as nanoseconds. More...
|
|
RTEMS_INLINE_ROUTINE void | _Timestamp_To_timespec (const Timestamp_Control *_timestamp, struct timespec *_timespec) |
| Convert timestamp to struct timespec. More...
|
|
RTEMS_INLINE_ROUTINE void | _Timestamp_To_timeval (const Timestamp_Control *_timestamp, struct timeval *_timeval) |
| Convert timestamp to struct timeval. More...
|
|
This handler encapsulates functionality related to manipulating SuperCore Timestamps. SuperCore Timestamps may be used to represent time of day, uptime, or intervals.
The key attribute of the SuperCore Timestamp handler is that it is a completely opaque handler. There can be multiple implementations of the required functionality and with a recompile, RTEMS can use any implementation. It is intended to be a simple wrapper.
This handler can be implemented as either struct timespec or unsigned64 bit numbers. The use of a wrapper class allows the the implementation of timestamps to change on a per architecture basis. This is an important option as the performance of this handler is critical.
◆ Timestamp_Control
Define the Timestamp control type.
◆ _Timestamp_Add_to()
Adds two timestamps.
This routine adds two timestamps. The second argument is added to the first.
- Parameters
-
[in] | _time | points to the base time to be added to |
[in] | _add | points to the timestamp to add to the first argument |
◆ _Timestamp_Divide()
Divides a timestamp by another timestamp.
This routine divides a timestamp by another timestamp. The intended use is for calculating percentages to three decimal points.
- Parameters
-
[in] | _lhs | points to the left hand number |
[in] | _rhs | points to the right hand number |
[in] | _ival_percentage | points to the integer portion of the average |
[in] | _fval_percentage | points to the thousandths of percentage |
- Return values
-
This | method fills in result. |
◆ _Timestamp_Equal_to()
Equal to than operator for timestamps.
This method is the is equal to than operator for timestamps.
- Parameters
-
[in] | _lhs | points to the left hand side timestamp |
[in] | _rhs | points to the right hand side timestamp |
- Return values
-
This | method returns true if _lhs is equal to _rhs and false otherwise. |
◆ _Timestamp_Get_as_nanoseconds()
Get the timestamp as nanoseconds.
This method returns the timestamp as nanoseconds.
- Parameters
-
[in] | _time | points to the timestamp |
- Return values
-
◆ _Timestamp_Get_nanoseconds()
Get nanoseconds portion of timestamp.
This method returns the nanoseconds portion of the specified timestamp
- Parameters
-
[in] | _time | points to the timestamp |
- Return values
-
The | nanoseconds portion of _time. |
◆ _Timestamp_Get_seconds()
Get seconds portion of timestamp.
This method returns the seconds portion of the specified timestamp
- Parameters
-
[in] | _time | points to the timestamp |
- Return values
-
The | seconds portion of _time. |
◆ _Timestamp_Greater_than()
Greater than operator for timestamps.
This method is the greater than operator for timestamps.
- Parameters
-
[in] | _lhs | points to the left hand side timestamp |
[in] | _rhs | points to the right hand side timestamp |
- Return values
-
This | method returns true if _lhs is greater than the _rhs and false otherwise. |
◆ _Timestamp_Less_than()
Less than operator for timestamps.
This method is the less than operator for timestamps.
- Parameters
-
[in] | _lhs | points to the left hand side timestamp |
[in] | _rhs | points to the right hand side timestamp |
- Return values
-
This | method returns true if _lhs is less than the _rhs and false otherwise. |
◆ _Timestamp_Set()
Set timestamp to specified seconds and nanoseconds.
This method sets the timestamp to the specified _seconds and _nanoseconds value.
- Parameters
-
[in] | _time | points to the timestamp instance to validate. |
[in] | _seconds | is the seconds portion of the timestamp |
[in] | _nanoseconds | is the nanoseconds portion of the timestamp |
◆ _Timestamp_Set_to_zero()
Sets the timestamp to zero.
This method sets the timestamp to zero. value.
- Parameters
-
[in] | _time | points to the timestamp instance to zero. |
◆ _Timestamp_Subtract()
Subtracts two timestamps.
This routine subtracts two timestamps. result is set to end - start.
- Parameters
-
[in] | _start | points to the starting time |
[in] | _end | points to the ending time |
[in] | _result | points to the difference between starting and ending time. |
- Return values
-
This | method fills in _result. |
◆ _Timestamp_To_timespec()
Convert timestamp to struct timespec.
This method returns the seconds portion of the specified _timestamp.
- Parameters
-
[in] | _timestamp | points to the timestamp |
[in] | _timespec | points to the timespec |
◆ _Timestamp_To_timeval()
Convert timestamp to struct timeval.
- Parameters
-
[in] | _timestamp | points to the timestamp |
[in] | _timeval | points to the timeval |