SystemClock Linux

Implements SystemClock.

Summary
SystemClock LinuxImplements SystemClock.
CopyrightThis program is free software.
Files
C-kern/api/time/sysclock.hHeader file SystemClock.
C-kern/platform/Linux/time/sysclock.cImplementation file SystemClock Linux.
sysclock_t
helper
convertclockidConverts sysclock_e into <clockid_t>.
timespec2timevalue_sysclockConverts struct timespec into timevalue_t.
timespec_MAXSECONDSReturns the maximum value timespec->tv_sec can hold.
query
test

Copyright

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.

Author

© 2011 Jörg Seebohn

Files

C-kern/api/time/sysclock.h

Header file SystemClock.

C-kern/platform/Linux/time/sysclock.c

Implementation file SystemClock Linux.

sysclock_t

Summary
helper
convertclockidConverts sysclock_e into <clockid_t>.
timespec2timevalue_sysclockConverts struct timespec into timevalue_t.
timespec_MAXSECONDSReturns the maximum value timespec->tv_sec can hold.
query
test

helper

convertclockid

#define convertclockid(/*sysclock_e*/clock_type) ((clockid_t) (clock_type))

Converts sysclock_e into <clockid_t>.

timespec2timevalue_sysclock

static inline void timespec2timevalue_sysclock(/*out*/timevalue_t *tval,
const struct timespec *tspec)

Converts struct timespec into timevalue_t.

timespec_MAXSECONDS

static inline uint64_t timespec_MAXSECONDS(void)

Returns the maximum value timespec->tv_sec can hold.

query

test

Interface to read (or set) the system clock.
Implements SystemClock.
#define convertclockid(/*sysclock_e*/clock_type) ((clockid_t) (clock_type))
Converts sysclock_e into clockid_t.
This value selects the clock type.
static inline void timespec2timevalue_sysclock(/*out*/timevalue_t *tval,
const struct timespec *tspec)
Converts struct timespec into timevalue_t.
struct timevalue_t
The time value specifies either an aboslute time or a relative time offset.
static inline uint64_t timespec_MAXSECONDS(void)
Returns the maximum value timespec->tv_sec can hold.
Close