rpm: rpmsw.h Source File

rpm 4.10.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

rpmsw.h
Go to the documentation of this file.

    00001 #ifndef H_RPMSW
    00002 #define H_RPMSW
    00003
    00008 #include <unistd.h>
    00009 #include <sys/time.h>
    00010
    00011 #ifdef __cplusplus
    00012 extern "C" {
    00013 #endif
    00014
    00017 typedef unsigned long int rpmtime_t;
    00018
    00021 typedef struct rpmsw_s * rpmsw;
    00022
    00025 typedef struct rpmop_s * rpmop;
    00026
    00029 struct rpmsw_s {
    00030     union {
    00031         struct timeval tv;
    00032         unsigned long long int ticks;
    00033         unsigned long int tocks[2];
    00034     } u;
    00035 };
    00036
    00040 struct rpmop_s {
    00041     struct rpmsw_s      begin;
    00042     int                 count;
    00043     size_t              bytes;
    00044     rpmtime_t           usecs;
    00045 };
    00046
    00052 rpmsw rpmswNow(rpmsw sw);
    00053
    00060 rpmtime_t rpmswDiff(rpmsw end, rpmsw begin);
    00061
    00066 rpmtime_t rpmswInit(void);
    00067
    00074 int rpmswEnter(rpmop op, ssize_t rc);
    00075
    00082 rpmtime_t rpmswExit(rpmop op, ssize_t rc);
    00083
    00090 rpmtime_t rpmswAdd(rpmop to, rpmop from);
    00091
    00098 rpmtime_t rpmswSub(rpmop to, rpmop from);
    00099
    00100 #ifdef __cplusplus
    00101 }
    00102 #endif
    00103
    00104 #endif  /* H_RPMSW */