summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-12-18 10:45:13 (GMT)
committerGitHub <noreply@github.com>2018-12-18 10:45:13 (GMT)
commit62a68b762a479a72c3defba9ace5f72a0063c5c6 (patch)
treedcadb35bdadeaae4cd99842e65e2a3bf412336ec /Misc
parent1dd035954bb03c41b954ebbd63969b4bcb0e106e (diff)
downloadcpython-62a68b762a479a72c3defba9ace5f72a0063c5c6.zip
cpython-62a68b762a479a72c3defba9ace5f72a0063c5c6.tar.gz
cpython-62a68b762a479a72c3defba9ace5f72a0063c5c6.tar.bz2
bpo-31784: Use time.time_ns() in uuid.uuid1() (GH-11189)
uuid.uuid1() now calls time.time_ns() rather than int(time.time() * 1e9). Replace also int(nanoseconds/100) with nanoseconds // 100. Add an unit test.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-12-17-11-43-11.bpo-31784.W0gDjC.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-12-17-11-43-11.bpo-31784.W0gDjC.rst b/Misc/NEWS.d/next/Library/2018-12-17-11-43-11.bpo-31784.W0gDjC.rst
new file mode 100644
index 0000000..6f0cb8f
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-12-17-11-43-11.bpo-31784.W0gDjC.rst
@@ -0,0 +1,2 @@
+:func:`uuid.uuid1` now calls :func:`time.time_ns` rather than
+``int(time.time() * 1e9)``.