<p>Windows also has this albeit course grained and also 32 bit. I don't think ticks reflects the reason why using the timer is desirable. </p>
<p>monotonic_time seems reasonable, there's no reason to persist short names when users can import it how they like. </p>
<div class="gmail_quote">On Mar 16, 2012 7:20 AM, "Steven D&apos;Aprano" <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Terry Reedy wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 3/15/2012 5:27 PM, Alexander Belopolsky wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Mar 15, 2012 at 3:55 PM, Matt Joiner<<a href="mailto:anacrolix@gmail.com" target="_blank">anacrolix@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+1. I now prefer time.monotonic(), no flags.<br>
</blockquote>
<br>
Am I alone thinking that an adjective is an odd choice for a function<br>
name?<br>
</blockquote>
<br>
I would normally agree, but in this case, it is a function of a module whose short name names what the adjective is modifying. I expect that this will normally be called with the module name.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think monotonic_clock or monotonic_time would be a better option.<br>
</blockquote>
<br>
time.monotonic_time seems redundant.<br>
</blockquote>
<br>
Agreed. Same applies to "steady_time", and "steady" on its own is weird. Steady what?<br>
<br>
While we're bike-shedding, I'll toss in another alternative. Early Apple Macintoshes had a system function that returned the time since last reboot measured in 1/60th of a second, called "the ticks".<br>
<br>
If I have understood correctly, the monotonic timer will have similar properties: guaranteed monotonic, as accurate as the hardware can provide, but not directly translatable to real (wall-clock) time. (Wall clocks sometimes go backwards.)<br>
<br>
The two functions are not quite identical: Mac "ticks" were 32-bit integers, not floating point numbers. But the use-cases seem to be the same.<br>
<br>
time.ticks() seems right as a name to me. It suggests a steady heartbeat ticking along, without making any suggestion that it returns "the time".<br>
<br>
<br>
<br>
-- <br>
Steven<br>
<br>
______________________________<u></u>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com" target="_blank">http://mail.python.org/<u></u>mailman/options/python-dev/<u></u>anacrolix%40gmail.com</a><br>
</blockquote></div>