Messages in this thread | | | Date | Tue, 27 Dec 2011 08:25:11 +0100 | From | Richard Cochran <> | Subject | Re: [PATCH 1/4] Add clock_gettime_ns syscall |
| |
On Sun, Dec 25, 2011 at 08:51:00AM -0800, Andy Lutomirski wrote: > > This interface intentionally does not support sub-nanosecond > precision. For one thing, light only travels about a foot per > nanosecond, so nanoseconds are really pretty good for networking > purposes. For another, 2^64 picoseconds (say) is a short enough > interval to be inconvenient. If anyone needs sub-nanosecond > precision for anything other than profiling, they're welcome to > figure out an appropriate interface. For very precise profiling, > "what time is it" is the wrong question, anyway -- modern CPUs can > reorder things across time scales much longer than a nanosecond.
This paragraph probably should be updated, since you did add a padding field for future sub-nanosecond reporting.
Also, on re-reading this, it seems silly to be to introduce a function called "clock_gettime_ns" and then to say that this function cannot answer the question, what time is it?
If the interface is a profiling only interface, then the name should reflect this fact.
Thanks, Richard
| |