util_timeval.h File Reference

#include <sys/time.h>
#include <time.h>

Go to the source code of this file.

Functions

static void timeval_add (struct timeval *dst_ts, const struct timeval *src1_ts, const struct timeval *src2_ts)
 Add two timeval values and normalize result.
static void timeval_sub (struct timeval *dst_ts, const struct timeval *src1_ts, const struct timeval *src2_ts)
 Sub two timeval values and normalize result.
static long timeval_sub_us (const struct timeval *src1_tv, const struct timeval *src2_tv)
static int timeval_lt (const struct timeval *t1, const struct timeval *t2)
static int timeval_le (const struct timeval *t1, const struct timeval *t2)
static int timeval_eq (const struct timeval *t1, const struct timeval *t2)

Function Documentation

static void timeval_add ( struct timeval *  dst_ts,
const struct timeval *  src1_ts,
const struct timeval *  src2_ts 
) [inline, static]

Add two timeval values and normalize result.

Definition at line 5 of file util_timeval.h.

Referenced by main(), and spin_periodic_call().

static int timeval_eq ( const struct timeval *  t1,
const struct timeval *  t2 
) [inline, static]

Definition at line 43 of file util_timeval.h.

static int timeval_le ( const struct timeval *  t1,
const struct timeval *  t2 
) [inline, static]

Definition at line 38 of file util_timeval.h.

static int timeval_lt ( const struct timeval *  t1,
const struct timeval *  t2 
) [inline, static]

Definition at line 33 of file util_timeval.h.

Referenced by spin_periodic_call().

static void timeval_sub ( struct timeval *  dst_ts,
const struct timeval *  src1_ts,
const struct timeval *  src2_ts 
) [inline, static]

Sub two timeval values and normalize result.

Note:
This also works if dst_ts == src1 || dst_ts == src2 || src1 == src2

Definition at line 19 of file util_timeval.h.

static long timeval_sub_us ( const struct timeval *  src1_tv,
const struct timeval *  src2_tv 
) [inline, static]

Definition at line 28 of file util_timeval.h.

Referenced by f().

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