diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-21 12:28:16 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-27 09:43:15 -0500 |
commit | c3c0a05f51eff73e624b18f651339ed08a122e3d (patch) | |
tree | f679e50de45db6c6a5218bdb0815da4f5f058172 /src/or/or.h | |
parent | da82e0b5795c449f4442c87e065e9a60da4892a8 (diff) | |
download | tor-c3c0a05f51eff73e624b18f651339ed08a122e3d.tar.gz tor-c3c0a05f51eff73e624b18f651339ed08a122e3d.zip |
Add a new notion of "stamps" to be a fast 32-bit monotonic timestamp
The goal here is to replace our use of msec-based timestamps with
something less precise, but easier to calculate. We're doing this
because calculating lots of msec-based timestamps requires lots of
64/32 division operations, which can be inefficient on 32-bit
platforms.
We make sure that these stamps can be calculated using only the
coarse monotonic timer and 32-bit bitwise operations.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h index 809714b5e2..59cceb72ce 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1166,8 +1166,8 @@ typedef struct packed_cell_t { /** Next cell queued on this circuit. */ TOR_SIMPLEQ_ENTRY(packed_cell_t) next; char body[CELL_MAX_NETWORK_SIZE]; /**< Cell as packed for network. */ - uint32_t inserted_time; /**< Time (in milliseconds since epoch, with high - * bits truncated) when this cell was inserted. */ + uint32_t inserted_timestamp; /**< Time (in timestamp units) when this cell + * was inserted */ } packed_cell_t; /** A queue of cells on a circuit, waiting to be added to the |