Summary: | nanosecond timers | ||
---|---|---|---|
Product: | systemtap | Reporter: | Frank Ch. Eigler <fche> |
Component: | runtime | Assignee: | Josh Stone <jistone> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Frank Ch. Eigler
2006-09-20 16:10:51 UTC
Committed. I did the kHz change, but that actually takes the units the wrong direction. Before, we did cycles/MHz = cycles/(cycles/usec) = usec. With kHz, you have cycles/kHz = cycles/(cycles/msec) = msec. Thus, a 1E6 adjustment is needed, best before the division. cycles * (1E6 nsec/msec) / (cycles/msec) = nsec So, I was using MHz because it conveniently led to microseconds. To conveniently divide to nanoseconds we would need to use GHz, but with integers that is too imprecise. So now we're keeping kHz, and we can deal with an extra multiply. |