Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
ktime.h File Reference
#include <linux/time.h>
#include <linux/jiffies.h>

Go to the source code of this file.

Data Structures

union  ktime
 

Macros

#define LOW_RES_NSEC   TICK_NSEC
 
#define KTIME_LOW_RES   (ktime_t){ .tv64 = LOW_RES_NSEC }
 
#define ktime_get_real_ts(ts)   getnstimeofday(ts)
 

Typedefs

typedef union ktime ktime_t
 

Functions

ktime_t ktime_add_ns (const ktime_t kt, u64 nsec)
 
ktime_t ktime_sub_ns (const ktime_t kt, u64 nsec)
 
ktime_t ktime_add_safe (const ktime_t lhs, const ktime_t rhs)
 
void ktime_get_ts (struct timespec *ts)
 

Macro Definition Documentation

#define ktime_get_real_ts (   ts)    getnstimeofday(ts)

Definition at line 327 of file ktime.h.

#define KTIME_LOW_RES   (ktime_t){ .tv64 = LOW_RES_NSEC }

Definition at line 321 of file ktime.h.

#define LOW_RES_NSEC   TICK_NSEC

Definition at line 320 of file ktime.h.

Typedef Documentation

typedef union ktime ktime_t

Definition at line 59 of file ktime.h.

Function Documentation

ktime_t ktime_add_ns ( const ktime_t  kt,
u64  nsec 
)

ktime_add_ns - Add a scalar nanoseconds value to a ktime_t variable : addend : the scalar nsec value to add

Returns the sum of and in ktime_t format

ktime_add_ns - Add a scalar nanoseconds value to a ktime_t variable : addend : the scalar nsec value to add

Returns the sum of kt and nsec in ktime_t format

Definition at line 267 of file hrtimer.c.

ktime_t ktime_add_safe ( const ktime_t  lhs,
const ktime_t  rhs 
)

Definition at line 333 of file hrtimer.c.

void ktime_get_ts ( struct timespec ts)

ktime_get_ts - get the monotonic clock in timespec format : pointer to timespec variable

The function calculates the monotonic clock from the realtime clock and the wall_to_monotonic offset and stores the result in normalized timespec format in the variable pointed to by .

Definition at line 279 of file timekeeping.c.

ktime_t ktime_sub_ns ( const ktime_t  kt,
u64  nsec 
)

ktime_sub_ns - Subtract a scalar nanoseconds value from a ktime_t variable : minuend : the scalar nsec value to subtract

Returns the subtraction of from in ktime_t format

Definition at line 291 of file hrtimer.c.