Message11661

Author zsd
Recipients zsd
Date 2017-11-19.20:21:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511122863.52.0.213398074469.issue2643@psf.upfronthosting.co.za>
In-reply-to
Content
www.jython.org/docs/library/time.html says

time.clock()

On Unix, return the current processor time as a floating point number expressed in seconds. The precision, and in fact the very definition of the meaning of “processor time”, depends on that of the C function of the same name, but in any case, this is the function to use for benchmarking Python or timing algorithms.

Now, admittedly Linux is not Unix (in some legal sense), but one might expect it to behave that way.  However, on my system using Python I see results like
>>> from time import clock
>>> clock()
0.008841
>>> clock()
0.009116
>>> clock()
0.009375

but using jython I see
>>> from time import clock
>>> clock()
0.0
>>> clock()
1.96381048
>>> clock()
7.051992804

which contradicts the documentation above.
History
Date User Action Args
2017-11-19 20:21:03zsdsetrecipients: + zsd
2017-11-19 20:21:03zsdsetmessageid: <1511122863.52.0.213398074469.issue2643@psf.upfronthosting.co.za>
2017-11-19 20:21:03zsdlinkissue2643 messages
2017-11-19 20:21:02zsdcreate