A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-September/028660.html below:

[Python-Dev] Subsecond time stamps

[Python-Dev] Subsecond time stamps [Python-Dev] Subsecond time stampsMartin v. Loewis martin@v.loewis.de
06 Sep 2002 17:40:51 +0200
Paul Svensson <paul-python@svensson.org> writes:

> This seems to me the most Pythonic way.
> Are C doubles dense enough to offer 100 ns resolution ?

It looks like they are:

>>> time.time()
1031326478.373606
>>> 1031326478 + 1e-6
1031326478.000001
>>> 1031326478 + 1e-7
1031326478.0000001
>>> 1031326478 + 1e-8
1031326478.0

but only just so:
>>> 1031326478 + 2e-7
1031326478.0000002
>>> 1031326478 + 3e-7
1031326478.0000004
>>> 1031326478 + 4e-7
1031326478.0000004

I admit that this looks tempting, but I'm worried about applications
that break because they expect time stamps in struct stat to be
integers.

Regards,
Martin



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4