|
Tor 0.4.9.8
|
Declarations for timeval-related macros that some platforms are missing. More...
Go to the source code of this file.
Macros | |
| #define | timeradd(tv1, tv2, tvout) |
| #define | timersub(tv1, tv2, tvout) |
| #define | timercmp(tv1, tv2, op) |
Declarations for timeval-related macros that some platforms are missing.
Definition in file timeval.h.
| #define timeradd | ( | tv1, | |
| tv2, | |||
| tvout ) |
Replacement for timeradd on platforms that do not have it: sets tvout to the sum of tv1 and tv2.
Definition at line 47 of file timeval.h.
Referenced by tor_cond_wait().
| #define timercmp | ( | tv1, | |
| tv2, | |||
| op ) |
Replacement for timercmp on platforms that do not have it: returns true iff the relational operator "op" makes the expression tv1 op tv2 true.
Note that while this definition should work for all boolean operators, some platforms' native timercmp definitions do not support >=, <=, or ==. So don't use those.
Definition at line 81 of file timeval.h.
Referenced by circuit_expire_building(), circuit_expire_old_circuits_clientside(), and circuit_is_better().
| #define timersub | ( | tv1, | |
| tv2, | |||
| tvout ) |
Replacement for timersub on platforms that do not have it: sets tvout to tv1 minus tv2.
Definition at line 61 of file timeval.h.
Referenced by cpuworker_onion_handshake_replyfn(), and cpuworker_onion_handshake_threadfn().