18 #ifndef _RTEMS_SCORE_TIMESTAMPIMPL_H 19 #define _RTEMS_SCORE_TIMESTAMPIMPL_H 54 _ts.tv_sec = _seconds;
55 _ts.tv_nsec = _nanoseconds;
57 *_time = tstosbt(_ts);
113 return *_lhs > *_rhs;
133 return *_lhs == *_rhs;
172 *_result = *_end - *
_start;
191 uint32_t *_ival_percentage,
192 uint32_t *_fval_percentage
195 struct timespec _ts_left;
196 struct timespec _ts_right;
198 _ts_left = sbttots( *_lhs );
199 _ts_right = sbttots( *_rhs );
222 return (*_time >> 32);
240 _ts = sbttots( *_time );
242 return (uint32_t) _ts.tv_nsec;
260 _ts = sbttots( *_time );
275 struct timespec *_timespec
278 *_timespec = sbttots( *_timestamp );
289 struct timeval *_timeval
292 *_timeval = sbttotv( *_timestamp );
int64_t Timestamp_Control
Definition: timestamp.h:52
void _start(void)
System start entry.
RTEMS_INLINE_ROUTINE void _Timestamp_To_timeval(const Timestamp_Control *_timestamp, struct timeval *_timeval)
Convert timestamp to struct timeval.
Definition: timestampimpl.h:287
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
RTEMS_INLINE_ROUTINE bool _Timestamp_Equal_to(const Timestamp_Control *_lhs, const Timestamp_Control *_rhs)
Equal to than operator for timestamps.
Definition: timestampimpl.h:128
Helpers for Manipulating Timestamps.
RTEMS_INLINE_ROUTINE uint32_t _Timestamp_Get_nanoseconds(const Timestamp_Control *_time)
Get nanoseconds portion of timestamp.
Definition: timestampimpl.h:234
RTEMS_INLINE_ROUTINE void _Timestamp_Add_to(Timestamp_Control *_time, const Timestamp_Control *_add)
Adds two timestamps.
Definition: timestampimpl.h:145
RTEMS_INLINE_ROUTINE bool _Timestamp_Greater_than(const Timestamp_Control *_lhs, const Timestamp_Control *_rhs)
Greater than operator for timestamps.
Definition: timestampimpl.h:108
void _Timespec_Divide(const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage)
Divide a timespec by anonther timespec.
Definition: timespecdivide.c:24
RTEMS_INLINE_ROUTINE void _Timestamp_Subtract(const Timestamp_Control *_start, const Timestamp_Control *_end, Timestamp_Control *_result)
Subtracts two timestamps.
Definition: timestampimpl.h:166
RTEMS_INLINE_ROUTINE time_t _Timestamp_Get_seconds(const Timestamp_Control *_time)
Get seconds portion of timestamp.
Definition: timestampimpl.h:218
RTEMS_INLINE_ROUTINE uint64_t _Timestamp_Get_as_nanoseconds(const Timestamp_Control *_time)
Get the timestamp as nanoseconds.
Definition: timestampimpl.h:254
RTEMS_INLINE_ROUTINE void _Timestamp_Set(Timestamp_Control *_time, time_t _seconds, long _nanoseconds)
Set timestamp to specified seconds and nanoseconds.
Definition: timestampimpl.h:46
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.
Definition: timestampimpl.h:188
RTEMS_INLINE_ROUTINE void _Timestamp_Set_to_zero(Timestamp_Control *_time)
Sets the timestamp to zero.
Definition: timestampimpl.h:69
RTEMS_INLINE_ROUTINE bool _Timestamp_Less_than(const Timestamp_Control *_lhs, const Timestamp_Control *_rhs)
Less than operator for timestamps.
Definition: timestampimpl.h:88
uint64_t _Timespec_Get_as_nanoseconds(const struct timespec *time)
Get the timestamp as nanoseconds.
Definition: timespecgetasnanoseconds.c:23
RTEMS_INLINE_ROUTINE void _Timestamp_To_timespec(const Timestamp_Control *_timestamp, struct timespec *_timespec)
Convert timestamp to struct timespec.
Definition: timestampimpl.h:273