ironport/shrapnel — Issue #7: Implement New Time Tracking
Author: ehuss
Created: 2011-12-17 03:29:03+00:00
State: open

Using TSC has a variety of problems.

* Determining which sysctl to read to determine the TSC-to-seconds conversion is difficult. Some systems don't even have it (My Mac Mini with Snow Leopard, Bob's Amazon FreeBSD Xen virtualized system, etc.).
* Some systems do not have a reliable TSC. We do not check for this.
* There's clunky code to handle re-calibrating our relationship of TSC to wall clock. I've never been comfortable with this. (This was a performance hack to avoid calling gettimeofday a lot, I'm not sure how important that is.)

We need a new API for handling high-resolution time. Preferably something that can use multiple types of time. See https://github.com/ironport/aplib/issues/2 for more detail.

Preferably, this new API would be in shrapnel to help remove the dependency with aplib.