[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #29640 [Core Tor/Tor]: Improve the monotonic time documentation in compat_time.c



#29640: Improve the monotonic time documentation in compat_time.c
------------------------------+--------------------------------
     Reporter:  teor          |      Owner:  teor
         Type:  defect        |     Status:  assigned
     Priority:  Medium        |  Milestone:  Tor: 0.4.1.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  tor-time
Actual Points:                |  Parent ID:
       Points:  0.1           |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 We discovered in #29500 that the monotonic time documentation is
 incomplete. Here are some improvements we could make:
 * define "monotonic" as "strictly non-decreasing, delta t >= 0"
 * explain when 0 time deltas are more likely:
   * when measuring units larger than nanoseconds (due to truncation on
 division)
   * on platforms with low resolution timers (because two time calls can
 happen faster than the resolution of the timer)
   * on Windows, where the time is not always monotonic, due to an OS bug
   * on platforms without specialised monotonic functions, during a wall
 clock time change
 * explain what happens when the timers overflow?

 Based on:
 ​https://gitweb.torproject.org/tor.git/tree/src/lib/time/compat_time.c#n175
 https://trac.torproject.org/projects/tor/ticket/29500#comment:11

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29640>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs