Rizin
unix-like reverse engineering framework and cli tools
io_gprobe.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2018-2020 pancake <pancake@nopcode.org>
2
// SPDX-License-Identifier: LGPL-3.0-only
3
4
#define Timercmp(tvp, uvp, cmp) \
5
(((tvp)->tv_sec == (uvp)->tv_sec) ? ((tvp)->tv_usec cmp(uvp)->tv_usec) : ((tvp)->tv_sec cmp(uvp)->tv_sec))
6
#define Timeradd(tvp, uvp, vvp) \
7
do { \
8
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
9
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
10
if ((vvp)->tv_usec >= 1000000) { \
11
(vvp)->tv_sec++; \
12
(vvp)->tv_usec -= 1000000; \
13
} \
14
} while (0)
15
#define Timersub(tvp, uvp, vvp) \
16
do { \
17
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
18
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
19
if ((vvp)->tv_usec < 0) { \
20
(vvp)->tv_sec--; \
21
(vvp)->tv_usec += 1000000; \
22
} \
23
} while (0)
librz
io
p
io_gprobe.h
Generated by
1.9.1