kgoodier/CocoaSPDY — pull request #3 by kgoodier (2014-11-19 01:03:20+00:00)
Title: Avoid use of CFAbsoluteTime as much as possible.

A helper class SPDYStopwatch is introduced here to abstract common
time management duties from the rest of the code.

Since CFAbsoluteTimeGetCurrent() is affected by clock and timezone
changes, it's use should be avoided. mach_absolute_time() is unaffected
by clock changes, but is susceptible to overflow issues (which can be
worked around) and doesn't increment while the system is asleep (which
cannot be worked around). However, it has more appropriate behavior.

Our use of CFAbsoluteTimeGetCurrent() for the timers is unavoidable,
since Cocoa timers are based on it. This seems like it would present
undesirable behavior for our deferrable and connect timers if the clock
were to change, but there's not much to do about it.