[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

Alexander Belopolsky report at bugs.python.org
Tue Jan 31 00:24:26 CET 2012


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

On Mon, Jan 30, 2012 at 6:15 PM, STINNER Victor <report at bugs.python.org> wrote:
> Another possibility is what I proposed before in the issue #11457: take a callback argument.
> http://bugs.python.org/issue11457#msg143738

I think you are over-engineering a complicated solution to a simple
problem.  If you want to add functionality to time module, add a
function with a new name that would mimic appropriate POSIX API and
return a (named) tuple of integers where C function would populate a
struct.  If you write a new high resolution time module - import
decimal at the top of the module and make all your clocks return
seconds as Decimal objects.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13882>
_______________________________________


More information about the Python-bugs-list mailing list