Interface to read (or set) the system clock.
You need to include “C-kern/api/time/timevalue.h” before you can use the interface.
SystemClock | Interface to read (or set) the system clock. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file SystemClock. |
C-kern/ | Implementation file SystemClock Linux. |
Enumerations | |
sysclock_e | This value selects the clock type. |
Functions | |
test | |
unittest_time_sysclock | Unittest for clock functions. |
sysclock_t | Interface to hardware system clock. |
query | |
resolution_sysclock | Returns the timer resolution of the underlying clock. |
time_sysclock | Returns the absolute time value of the underlying clock. |
wait | |
sleep_sysclock | Sleeps relative_time seconds (+nanoseconds). |
sleepms_sysclock | Sleeps millisec milliseconds. |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
© 2011 Jörg Seebohn
Header file SystemClock.
Implementation file SystemClock Linux.
test | |
unittest_time_sysclock | Unittest for clock functions. |
struct sysclock_t
Interface to hardware system clock.
query | |
resolution_sysclock | Returns the timer resolution of the underlying clock. |
time_sysclock | Returns the absolute time value of the underlying clock. |
wait | |
sleep_sysclock | Sleeps relative_time seconds (+nanoseconds). |
sleepms_sysclock | Sleeps millisec milliseconds. |
int sleep_sysclock( sysclock_e clock_type, const struct timevalue_t * relative_time )
Sleeps relative_time seconds (+nanoseconds). The time is obtained from clock clock_type (see sysclock_e).
int sleepms_sysclock( sysclock_e clock_type, uint32_t millisec )
Sleeps millisec milliseconds. The time is obtained from clock clock_type (see sysclock_e).
Unittest for clock functions.
int unittest_time_sysclock( void )
Interface to hardware system clock.
struct sysclock_t
Returns the timer resolution of the underlying clock.
int resolution_sysclock( sysclock_e clock_type, /*out*/struct timevalue_t * resolution )
Returns the absolute time value of the underlying clock.
int time_sysclock( sysclock_e clock_type, /*out*/struct timevalue_t * clock_time )
Sleeps relative_time seconds (+nanoseconds).
int sleep_sysclock( sysclock_e clock_type, const struct timevalue_t * relative_time )
Sleeps millisec milliseconds.
int sleepms_sysclock( sysclock_e clock_type, uint32_t millisec )