|How about an API that looked like this:|
seconds, fractional_seconds = foo.time()
You'd return integer seconds as the first return value, and fractional seconds (as a floating point number) as the second result. Code that was happy with the resolution that a floating point double yields could just carry around the sum of the two, ignoring the nanoseconds/picoseconds resolution that falls off the end. Code that was really worried about things would use a kernel facility that actually yields results in nanoseconds or better and would carry seconds, fractional seconds around separately.
Have variations on the function, perhaps specified by an optional argument, that would allow you to tradeoff precision/resolution, accuracy and cost might be nice depending on the application.
On Oct 11, 2011, at 12:02 PM, Francisco wrote:
thanks, I take a care of that :P ...