56#ifndef _RTEMS_RTEMS_CLOCK_H
57#define _RTEMS_RTEMS_CLOCK_H
62#include <rtems/config.h>
63#include <sys/_timespec.h>
64#include <sys/_timeval.h>
871#define rtems_clock_get_ticks_per_second() _Watchdog_Ticks_per_second
902#define rtems_clock_get_ticks_since_boot() _Watchdog_Ticks_since_boot
1077 + ( delta_in_usec + us_per_tick - 1 ) / us_per_tick;
1125static inline bool rtems_clock_tick_before(
rtems_interval ticks )
rtems_status_code rtems_clock_tick(void)
Announces a clock tick.
Definition: clocktick.c:46
void rtems_clock_get_realtime_coarse_timeval(struct timeval *time_snapshot)
Gets the time elapsed since the Unix epoch measured using CLOCK_REALTIME in coarse resolution in seco...
uint64_t rtems_clock_get_uptime_nanoseconds(void)
Gets the nanoseconds elapsed since some time point during the system initialization using CLOCK_MONOT...
Definition: clockgetuptimenanoseconds.c:45
void rtems_clock_get_boot_time_timeval(struct timeval *boot_time)
Gets the time elapsed since the Unix epoch at some time point during system initialization in seconds...
void rtems_clock_get_realtime_timeval(struct timeval *time_snapshot)
Gets the time elapsed since the Unix epoch measured using CLOCK_REALTIME in seconds and microseconds ...
rtems_status_code rtems_clock_get_tod_timeval(struct timeval *time_of_day)
Gets the seconds and microseconds elapsed since the Unix epoch and the current CLOCK_REALTIME.
Definition: clockgettodtimeval.c:45
#define rtems_clock_get_ticks_per_second()
Gets the number of clock ticks per second configured for the application.
Definition: clock.h:871
rtems_status_code rtems_clock_get_seconds_since_epoch(rtems_interval *seconds_since_rtems_epoch)
Gets the seconds elapsed since the RTEMS epoch and the current CLOCK_REALTIME.
Definition: clockgetsecondssinceepoch.c:45
time_t rtems_clock_get_uptime_seconds(void)
Gets the seconds elapsed since some time point during the system initialization using CLOCK_MONOTONIC...
Definition: clockgetuptimeseconds.c:25
void rtems_clock_get_uptime_timeval(struct timeval *uptime)
Gets the seconds and microseconds elapsed since some time point during the system initialization usin...
Definition: clockgetuptimetimeval.c:45
void rtems_clock_get_boot_time_bintime(struct bintime *boot_time)
Gets the time elapsed since the Unix epoch at some time point during system initialization in binary ...
void rtems_clock_get_boot_time(struct timespec *boot_time)
Gets the time elapsed since the Unix epoch at some time point during system initialization in seconds...
rtems_status_code rtems_clock_get_uptime(struct timespec *uptime)
Gets the seconds and nanoseconds elapsed since some time point during the system initialization using...
Definition: clockgetuptime.c:59
int64_t rtems_clock_get_monotonic_sbintime(void)
Gets the time elapsed since some fixed time point in the past measured using the CLOCK_MONOTONIC in s...
void rtems_clock_get_monotonic_timeval(struct timeval *time_snapshot)
Gets the time elapsed since some fixed time point in the past measured using the CLOCK_MONOTONIC in s...
void rtems_clock_get_monotonic_bintime(struct bintime *time_snapshot)
Gets the time elapsed since some fixed time point in the past measured using the CLOCK_MONOTONIC in b...
void rtems_clock_get_realtime_bintime(struct bintime *time_snapshot)
Gets the time elapsed since the Unix epoch measured using CLOCK_REALTIME in binary time format.
void rtems_clock_get_realtime_coarse(struct timespec *time_snapshot)
Gets the time elapsed since the Unix epoch measured using CLOCK_REALTIME in coarse resolution in seco...
void rtems_clock_get_realtime(struct timespec *time_snapshot)
Gets the time elapsed since the Unix epoch measured using CLOCK_REALTIME in seconds and nanoseconds f...
void rtems_clock_get_monotonic_coarse_bintime(struct bintime *time_snapshot)
Gets the time elapsed since some fixed time point in the past measured using the CLOCK_MONOTONIC in c...
rtems_status_code rtems_clock_get_tod(rtems_time_of_day *time_of_day)
Gets the time of day associated with the current CLOCK_REALTIME.
Definition: clockgettod.c:102
void rtems_clock_get_monotonic_coarse_timeval(struct timeval *time_snapshot)
Gets the time elapsed since some fixed time point in the past measured using the CLOCK_MONOTONIC in c...
void rtems_clock_get_monotonic(struct timespec *time_snapshot)
Gets the time elapsed since some fixed time point in the past measured using the CLOCK_MONOTONIC in s...
#define rtems_clock_get_ticks_since_boot()
Gets the number of clock ticks since some time point during the system initialization or the last ove...
Definition: clock.h:902
rtems_status_code rtems_clock_set(const rtems_time_of_day *time_of_day)
Sets the CLOCK_REALTIME to the time of day.
Definition: clockset.c:47
void rtems_clock_get_monotonic_coarse(struct timespec *time_snapshot)
Gets the time elapsed since some fixed time point in the past measured using the CLOCK_MONOTONIC in c...
void rtems_clock_get_realtime_coarse_bintime(struct bintime *time_snapshot)
Gets the time elapsed since the Unix epoch measured using CLOCK_REALTIME in coarse resolution in bina...
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
Watchdog_Interval rtems_interval
This type represents clock tick intervals.
Definition: types.h:114
#define rtems_configuration_get_microseconds_per_tick()
Gets the number of microseconds per clock tick configured for this application.
Definition: config.h:527
volatile Watchdog_Interval _Watchdog_Ticks_since_boot
The watchdog ticks counter.
Definition: watchdogtickssinceboot.c:50
This header file provides types used by the Classic API.
This header file provides the status codes of Classic API directives and support functions.
This type represents Classic API calendar times.
Definition: types.h:266
This header file provides the interfaces of the Watchdog Handler related to watchdog ticks which are ...