[tor-bugs] #10168 [Tor]: Use monotonic clocks for time as appropriate

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jun 11 15:21:01 UTC 2014


#10168: Use monotonic clocks for time as appropriate
-----------------------------+--------------------------------
     Reporter:  nickm        |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  normal       |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------------

Comment (by nickm):

 A thought: these should not use timeval or time_t, but rather should use a
 new set of structs, eg

 {{{
   typedef monotime_s {
     time_t t;
   } monotime_t;

   typedef monotimeval_s {
     struct timeval tv;
   } monotimeval_t;
   ...
 }}}

 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().

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10168#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list