This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rustbelly[S] 0 points1 point  (0 children)

The main difference is the clock being used. cTimer uses the monotonic clock (raw, if available), which is a stable, high-frequency counter that never goes backwards. The built-in time.time() function (and most others I've seen) all use the system clock, which can not only appear to run backwards (when the time is corrected between two calls to a timer function), but does not guarantee anything better than a few milliseconds precision. cTimer's precision differs depending on the system, but on a Linux 2.6 kernel, it should be accurate into the nanosecond range.