In some places, like or or, we want to use wall-clock time. But in others, like timers and so forth, we should be using a monotonic timer so we just don't have to worry about time moving backwards.
Libevent 2.1 has a subsystem for this; we could just use it as needed. Or we could snarf the code and adapt it for our uses.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
We came up with a simple ratcheted implementation in tor_gettimeofday_cached_monotonic. Doing the right thing here will be a bit tricky, given how we need to cache times here too, so I think we're okay deferring to 0.2.6.
This will help us make the code safe, since the timevals that you get from clock_gettime() do not necessarily correspond to the ones you get from gettimeofday().