#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 KAL_TIME_FMT "<%6lu.%5lu>" |
Definition at line 18 of file kal_time_jiffies.h.
Referenced by recharge(), rres_activate_nosched(), rres_sample_time(), rres_update_budget(), set_enforce_timer(), and update_budgets().
#define KAL_TIME_FMT_ARG | ( | t | ) | kal_time_get_sec(t), kal_time_get_usec(t) |
Definition at line 20 of file kal_time_jiffies.h.
Referenced by recharge(), rres_activate_nosched(), rres_sample_time(), rres_update_budget(), set_enforce_timer(), and update_budgets().
#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 }) |
Definition at line 16 of file kal_time_jiffies.h.
Referenced by jiffies_to_timespec(), kal_usec2time(), recharge_reset_from_now(), rres_init_server(), rres_update_budget(), and usec_to_timespec().
typedef unsigned long kal_time_t |
Kernel-dependent long time information.
Definition at line 13 of file kal_time_jiffies.h.
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] |
Definition at line 41 of file kal_time_jiffies.h.
Referenced by qos_func_define(), rres_activate_nosched(), rres_get_curr_budget(), rres_get_exec_time(), rres_schedule(), and rres_set_params().
static kal_time_t kal_time_add | ( | kal_time_t | ta, | |
kal_time_t | tb | |||
) | [inline, static] |
Definition at line 49 of file kal_time_jiffies.h.
Referenced by kal_timer_forward(), recharge(), rres_get_exec_time(), rres_update_budget(), set_enforce_timer(), and update_budgets().
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] |
Definition at line 62 of file kal_time_jiffies.h.
Referenced by recharge(), rres_activate_nosched(), rres_set_budget(), rres_set_params(), and rres_update_budget().
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] |
Definition at line 90 of file kal_time_jiffies.h.
References jiffies.
Referenced by kal_timer_init_now(), qos_func_define(), rres_get_exec_time(), rres_init_server(), and rres_sample_time().
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] |
Definition at line 53 of file kal_time_jiffies.h.
Referenced by rres_activate_nosched(), rres_get_exec_time(), rres_set_params(), rres_update_budget(), and update_budgets().
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().