Space independent time querying mechanism. More...
#include <linux/aquosa/qos_types.h>
#include <aquosa/qres_lib.h>
#include <time.h>
#include <sys/time.h>
Go to the source code of this file.
Data Structures | |
struct | qmgr_time_t |
The qmgr_time_t type. More... | |
Typedefs | |
typedef struct qmgr_time_t | qmgr_time_t |
The qmgr_time_t type. | |
Functions | |
static void | timespec_add (struct timespec *dst_ts, struct timespec *src1_ts, struct timespec *src2_ts) |
Add two timespec values and normalize result. | |
static void | timespec_sub (struct timespec *dst_ts, struct timespec *src1_ts, struct timespec *src2_ts) |
Sub two timespec values and normalize result. | |
static signed long | timespec_sub_us (struct timespec *ts2, struct timespec *ts1) |
Compute ts2 - ts1 and return the (signed) result in microseconds. | |
static void | qmgr_time_init (qmgr_time_t *self) |
Initialize the qmgr_time_t object. | |
static qres_time_t | qmgr_time_get_elapsed (qmgr_time_t *self) |
Return the elapsed absolute time since last call. | |
static qres_time_t | qmgr_time_get_exec (qmgr_time_t *self) |
Return the time for which the attached server executed since last call. | |
static void | qmgr_time_tick_xs (qres_time_t *p_exec_time, struct timespec *p_abs_time) |
Space-independent help function. | |
static void | qmgr_time_tick (qmgr_time_t *self) |
static struct timespec | qmgr_time_get_abs_time (qmgr_time_t *self) |
Return the absolute time at the time qmgr_time_tick() was called. |
Space independent time querying mechanism.
Definition in file qmgr_time.h.
static qres_time_t qmgr_time_get_elapsed | ( | qmgr_time_t * | self | ) | [inline, static] |
Return the elapsed absolute time since last call.
The returned value represents the elapsed absolute time since last qmgr_time_init() or qmgr_time_get_elapsed() call, in microseconds.
Definition at line 110 of file qmgr_time.h.
References timespec_sub_us().
static qres_time_t qmgr_time_get_exec | ( | qmgr_time_t * | self | ) | [inline, static] |
Return the time for which the attached server executed since last call.
The returned value represents the amount of time for which the server attached to the calling task was running on the CPU, since last qmgr_time_init() or qmgr_time_get_exec() call, in microseconds.
Definition at line 115 of file qmgr_time.h.
static void timespec_sub | ( | struct timespec * | dst_ts, | |
struct timespec * | src1_ts, | |||
struct timespec * | src2_ts | |||
) | [inline, static] |
Sub two timespec values and normalize result.
Definition at line 44 of file qmgr_time.h.