20 #ifndef _RTEMS_SCORE_TIMESTAMPIMPL_H 21 #define _RTEMS_SCORE_TIMESTAMPIMPL_H 56 _ts.tv_sec = _seconds;
57 _ts.tv_nsec = _nanoseconds;
59 *_time = tstosbt(_ts);
115 return *_lhs > *_rhs;
135 return *_lhs == *_rhs;
172 *_result = *_end - *_start;
189 uint32_t *_ival_percentage,
190 uint32_t *_fval_percentage
193 struct timespec _ts_left;
194 struct timespec _ts_right;
196 _ts_left = sbttots( *_lhs );
197 _ts_right = sbttots( *_rhs );
220 return (*_time >> 32);
238 _ts = sbttots( *_time );
240 return (uint32_t) _ts.tv_nsec;
258 _ts = sbttots( *_time );
271 struct timespec *_timespec
274 *_timespec = sbttots( *_timestamp );
285 struct timeval *_timeval
288 *_timeval = sbttotv( *_timestamp );
static __inline__ time_t _Timestamp_Get_seconds(const Timestamp_Control *_time)
Gets seconds portion of timestamp.
int64_t Timestamp_Control
static __inline__ bool _Timestamp_Less_than(const Timestamp_Control *_lhs, const Timestamp_Control *_rhs)
Checks if the left hand side timestamp is less than the right one.
static __inline__ uint64_t _Timestamp_Get_as_nanoseconds(const Timestamp_Control *_time)
Gets the timestamp as nanoseconds.
static __inline__ 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.
static __inline__ void _Timestamp_Set(Timestamp_Control *_time, time_t _seconds, long _nanoseconds)
Sets timestamp to specified seconds and nanoseconds.
Helpers for Manipulating Timestamps.
static __inline__ bool _Timestamp_Greater_than(const Timestamp_Control *_lhs, const Timestamp_Control *_rhs)
Checks if the left hand side timestamp is greater than the right one.
static __inline__ void _Timestamp_Subtract(const Timestamp_Control *_start, const Timestamp_Control *_end, Timestamp_Control *_result)
Subtracts two timestamps.
static __inline__ void _Timestamp_Set_to_zero(Timestamp_Control *_time)
Sets the timestamp to zero.
void _Timespec_Divide(const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage)
Divides a timespec by another timespec.
static __inline__ void _Timestamp_Add_to(Timestamp_Control *_time, const Timestamp_Control *_add)
Adds two timestamps.
static __inline__ uint32_t _Timestamp_Get_nanoseconds(const Timestamp_Control *_time)
Gets nanoseconds portion of timestamp.
static __inline__ void _Timestamp_To_timespec(const Timestamp_Control *_timestamp, struct timespec *_timespec)
Converts timestamp to struct timespec.
This header file provides basic definitions used by the API and the implementation.
static __inline__ void _Timestamp_To_timeval(const Timestamp_Control *_timestamp, struct timeval *_timeval)
Converts timestamp to struct timeval.
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
static __inline__ bool _Timestamp_Equal_to(const Timestamp_Control *_lhs, const Timestamp_Control *_rhs)
Checks if the timestamps are equal.
uint64_t _Timespec_Get_as_nanoseconds(const struct timespec *time)
Gets the timestamp as nanoseconds.