aboutsummaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-13 09:34:20 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-13 09:46:58 -0500
commit219c969d7bf858c4df5fc6ee9b0c472a525b6b2a (patch)
tree2b3aa9585fe033c4c2a9a074e8ad90f5d0bead05 /autogen.sh
parentdd6dec2665af9964d8f940c27f3f0815a649424a (diff)
downloadtor-219c969d7bf858c4df5fc6ee9b0c472a525b6b2a.tar.gz
tor-219c969d7bf858c4df5fc6ee9b0c472a525b6b2a.zip
Use monotime_coarse for transfer times and padding times
Using absolute_msec requires a 64-bit division operation every time we calculate it, which gets expensive on 32-bit architectures. Instead, just use the lazy "monotime_coarse_get()" operation, and don't convert to milliseconds until we absolutely must. In this case, it seemed fine to use a full monotime_coarse_t rather than a truncated "stamp" as we did to solve this problem for the timerstamps in buf_t and packed_cell_t: There are vastly more cells and buffer chunks than there are channels, and using 16 bytes per channel in the worst case is not a big deal. There are still more millisecond operations here than strictly necessary; let's see any divisions show up in profiles.
Diffstat (limited to 'autogen.sh')
0 files changed, 0 insertions, 0 deletions