Linux Kernel
3.7.1
|
#include <linux/cache.h>
#include <linux/seqlock.h>
#include <linux/math64.h>
#include <uapi/linux/time.h>
Go to the source code of this file.
Data Structures | |
struct | tm |
Macros | |
#define | MSEC_PER_SEC 1000L |
#define | USEC_PER_MSEC 1000L |
#define | NSEC_PER_USEC 1000L |
#define | NSEC_PER_MSEC 1000000L |
#define | USEC_PER_SEC 1000000L |
#define | NSEC_PER_SEC 1000000000L |
#define | FSEC_PER_SEC 1000000000000000LL |
#define | TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) |
#define | KTIME_MAX ((s64)~((u64)1 << 63)) |
#define | KTIME_SEC_MAX LONG_MAX |
#define | CURRENT_TIME (current_kernel_time()) |
#define | CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
#define | do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) |
Variables | |
struct timezone | sys_tz |
int | timekeeping_suspended |
#define CURRENT_TIME (current_kernel_time()) |
#define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
#define do_posix_clock_monotonic_gettime | ( | ts | ) | ktime_get_ts(ts) |
#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) |
Definition at line 1260 of file timekeeping.c.
alarm_setitimer - set alarm in seconds
: number of seconds until alarm 0 disables the alarm
Returns the remaining time in seconds of a pending timer or 0 when the timer is not active.
On 32 bit machines the seconds value is limited to (INT_MAX/2) to avoid negative timeval settings which would cause immediate expiry.
Definition at line 1267 of file timekeeping.c.
do_gettimeofday - Returns the time of day in a timeval : pointer to the timeval to be set
NOTE: Users should be converted to using getnstimeofday()
Definition at line 346 of file timekeeping.c.
Definition at line 1283 of file timekeeping.c.
Definition at line 1252 of file timekeeping.c.
void get_xtime_and_monotonic_and_sleep_offset | ( | struct timespec * | xtim, |
struct timespec * | wtom, | ||
struct timespec * | sleep | ||
) |
get_xtime_and_monotonic_and_sleep_offset() - get xtime, wall_to_monotonic, and sleep offsets. : pointer to timespec to be set with xtime : pointer to timespec to be set with wall_to_monotonic : pointer to timespec to be set with time in suspend
Definition at line 1320 of file timekeeping.c.
getboottime - Return the real time of system boot. : pointer to the timespec to be set
Returns the wall-time of boot in a timespec.
This is based on the wall_to_monotonic offset and the total suspend time. Calls to settimeofday will affect the value returned (which basically means that however wrong your real time clock is at boot time, you get the right time here).
Definition at line 1176 of file timekeeping.c.
monotonic_to_bootbased - Convert the monotonic time to boot based. : pointer to the timespec to be converted
Definition at line 1244 of file timekeeping.c.
set_normalized_timespec - set timespec sec and nsec parts and normalize
: pointer to timespec variable to be set : seconds to set : nanoseconds to set
Set seconds and nanoseconds field of a timespec variable and normalize to the timespec storage format
Note: The tv_nsec part is always in the range of 0 <= tv_nsec < NSEC_PER_SEC For negative values only the tv_sec field is negative !
time_to_tm - converts the calendar time to local broken-down time
the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC). offset seconds adding to totalsecs.
Definition at line 77 of file timeconv.c.
Definition at line 591 of file timekeeping.c.
timekeeping_inject_sleeptime - Adds suspend interval to timeekeeping values : pointer to a timespec delta value
This hook is for architectures that cannot support read_persistent_clock because their RTC/persistent clock is only accessible when irqs are enabled.
This function should only be called by rtc_resume(), and allows a suspend offset to be injected into the timekeeping values.
Definition at line 673 of file timekeeping.c.
timekeeping_max_deferment - Returns max time the clocksource can be deferred
Definition at line 542 of file timekeeping.c.
timekeeping_valid_for_hres - Check if timekeeping is suitable for hres
Definition at line 523 of file timekeeping.c.
timespec_trunc - Truncate timespec to a granularity : Timespec : Granularity in ns.
Truncate a timespec to a granularity. gran must be smaller than a second. Always rounds down.
This function should be only used for timestamps returned by current_kernel_time() or CURRENT_TIME, not with do_gettimeofday() because it doesn't handle the better resolution of the latter.
int timekeeping_suspended |
Definition at line 35 of file timekeeping.c.