kal_time_jiffies.h File Reference

#include <linux/time.h>

Go to the source code of this file.

Defines

#define KAL_TIME_NS(sec, nsec)   timespec_to_jiffies(&(struct timespec) { .tv_sec = (sec), .tv_nsec = ((long unsigned) nsec) })
#define KAL_TIME_US(sec, usec)   timespec_to_jiffies(&(struct timespec) { .tv_sec = (sec), .tv_nsec = ((long unsigned) usec) * 1000 })
#define KAL_TIME_FMT   "<%6lu.%5lu>"
#define KAL_TIME_FMT_ARG(t)   kal_time_get_sec(t), kal_time_get_usec(t)

Typedefs

typedef unsigned long kal_time_t
 Kernel-dependent long time information.

Functions

static kal_time_t kal_time_ns (unsigned long sec, unsigned long nsec)
static unsigned long kal_time_get_sec (kal_time_t t)
static unsigned long kal_time_get_usec (kal_time_t t)
static unsigned long kal_time_get_nsec (kal_time_t t)
static unsigned long long kal_time2usec (kal_time_t t)
static kal_time_t kal_usec2time (unsigned long long usec)
static kal_time_t kal_time_add (kal_time_t ta, kal_time_t tb)
static kal_time_t kal_time_sub (kal_time_t ta, kal_time_t tb)
static int kal_time_lt (kal_time_t t1, kal_time_t t2)
 Forcing a (unneeded) signed comparison among seconds.
static int kal_time_le (kal_time_t t1, kal_time_t t2)
static struct timespec kal_time2timespec (kal_time_t t)
unsigned long get_simulation_time (void)
static unsigned long get_jiffies (void)
static unsigned long timespec_to_jiffies (const struct timespec *t)
static void jiffies_to_timespec (const unsigned long jiffies, struct timespec *t)
static kal_time_t kal_time_now (void)
static unsigned long kal_time2jiffies (kal_time_t t)
static kal_time_t kal_jiffies2time (unsigned long jiffies)

Define Documentation

#define KAL_TIME_FMT   "<%6lu.%5lu>"
#define KAL_TIME_FMT_ARG (  )     kal_time_get_sec(t), kal_time_get_usec(t)
#define KAL_TIME_NS ( sec,
nsec   )     timespec_to_jiffies(&(struct timespec) { .tv_sec = (sec), .tv_nsec = ((long unsigned) nsec) })

Definition at line 15 of file kal_time_jiffies.h.

#define KAL_TIME_US ( sec,
usec   )     timespec_to_jiffies(&(struct timespec) { .tv_sec = (sec), .tv_nsec = ((long unsigned) usec) * 1000 })

Typedef Documentation

typedef unsigned long kal_time_t

Kernel-dependent long time information.

Definition at line 13 of file kal_time_jiffies.h.


Function Documentation

static unsigned long get_jiffies ( void   )  [inline, static]

Definition at line 78 of file kal_time_jiffies.h.

References get_simulation_time().

Referenced by kal_timer_init_now().

unsigned long get_simulation_time ( void   ) 

Referenced by get_jiffies(), and kal_time_now().

static void jiffies_to_timespec ( const unsigned long  jiffies,
struct timespec *  t 
) [inline, static]

Definition at line 84 of file kal_time_jiffies.h.

References KAL_TIME_US.

Referenced by kal_time2timespec(), and kal_time_get_nsec().

static kal_time_t kal_jiffies2time ( unsigned long  jiffies  )  [inline, static]

Definition at line 98 of file kal_time_jiffies.h.

static unsigned long kal_time2jiffies ( kal_time_t  t  )  [inline, static]

Definition at line 94 of file kal_time_jiffies.h.

Referenced by kal_timer_forward(), and kal_timer_set().

static struct timespec kal_time2timespec ( kal_time_t  t  )  [static, read]

Definition at line 66 of file kal_time_jiffies.h.

References jiffies_to_timespec().

Referenced by rres_get_deadline().

static unsigned long long kal_time2usec ( kal_time_t  t  )  [inline, static]
static kal_time_t kal_time_add ( kal_time_t  ta,
kal_time_t  tb 
) [inline, static]
static unsigned long kal_time_get_nsec ( kal_time_t  t  )  [inline, static]

Definition at line 35 of file kal_time_jiffies.h.

References jiffies_to_timespec().

static unsigned long kal_time_get_sec ( kal_time_t  t  )  [inline, static]

Definition at line 27 of file kal_time_jiffies.h.

static unsigned long kal_time_get_usec ( kal_time_t  t  )  [inline, static]

Definition at line 31 of file kal_time_jiffies.h.

static int kal_time_le ( kal_time_t  t1,
kal_time_t  t2 
) [inline, static]
static int kal_time_lt ( kal_time_t  t1,
kal_time_t  t2 
) [inline, static]

Forcing a (unneeded) signed comparison among seconds.

Definition at line 58 of file kal_time_jiffies.h.

Referenced by rres_set_params().

static kal_time_t kal_time_now ( void   )  [inline, static]
static kal_time_t kal_time_ns ( unsigned long  sec,
unsigned long  nsec 
) [inline, static]

Definition at line 22 of file kal_time_jiffies.h.

References timespec_to_jiffies().

static kal_time_t kal_time_sub ( kal_time_t  ta,
kal_time_t  tb 
) [inline, static]
static kal_time_t kal_usec2time ( unsigned long long  usec  )  [inline, static]

Definition at line 45 of file kal_time_jiffies.h.

Referenced by recharge(), rres_init_server(), rres_set_budget(), and rres_set_params().

static unsigned long timespec_to_jiffies ( const struct timespec *  t  )  [inline, static]

Definition at line 80 of file kal_time_jiffies.h.

Referenced by kal_time_ns().

Generated on Mon Aug 2 22:39:17 2010 for qosres by  doxygen 1.6.3