rpmsw.h
Go to the documentation of this file.
#ifndef H_RPMSW
#define H_RPMSW
#include <unistd.h>
#include <sys/time.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long int rpmtime_t;
typedef struct rpmsw_s * rpmsw;
typedef struct rpmop_s * rpmop;
struct rpmsw_s {
union {
struct timeval tv;
unsigned long long int ticks;
unsigned long int tocks[2];
} u;
};
struct rpmop_s {
struct rpmsw_s begin;
int count;
size_t bytes;
rpmtime_t usecs;
};
rpmsw rpmswNow(rpmsw sw);
rpmtime_t rpmswDiff(rpmsw end, rpmsw begin);
rpmtime_t rpmswInit(void);
int rpmswEnter(rpmop op, ssize_t rc);
rpmtime_t rpmswExit(rpmop op, ssize_t rc);
rpmtime_t rpmswAdd(rpmop to, rpmop from);
rpmtime_t rpmswSub(rpmop to, rpmop from);
#ifdef __cplusplus
}
#endif
#endif /* H_RPMSW */
rpmsw_s::ticks
unsigned long long int ticks
Definition: rpmsw.h:34
rpmop_s::bytes
size_t bytes
Definition: rpmsw.h:45
rpmswInit
rpmtime_t rpmswInit(void)
rpmsw_s::u
union rpmsw_s::@0 u
rpmop_s::begin
struct rpmsw_s begin
Definition: rpmsw.h:43
rpmsw_s::tv
struct timeval tv
Definition: rpmsw.h:33
rpmsw_s::tocks
unsigned long int tocks[2]
Definition: rpmsw.h:35
rpmswDiff
rpmtime_t rpmswDiff(rpmsw end, rpmsw begin)
rpmswSub
rpmtime_t rpmswSub(rpmop to, rpmop from)
rpmsw_s
Definition: rpmsw.h:31
rpmop
struct rpmop_s * rpmop
Definition: rpmsw.h:27
rpmop_s::count
int count
Definition: rpmsw.h:44
rpmswAdd
rpmtime_t rpmswAdd(rpmop to, rpmop from)
rpmop_s
Definition: rpmsw.h:42
rpmswEnter
int rpmswEnter(rpmop op, ssize_t rc)
rpmop_s::usecs
rpmtime_t usecs
Definition: rpmsw.h:46
rpmtime_t
unsigned long int rpmtime_t
Definition: rpmsw.h:19
rpmswNow
rpmsw rpmswNow(rpmsw sw)
rpmsw
struct rpmsw_s * rpmsw
Definition: rpmsw.h:23
rpmswExit
rpmtime_t rpmswExit(rpmop op, ssize_t rc)