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 */