Kaydet (Commit) 9cb018e6 authored tarafından Guido van Rossum's avatar Guido van Rossum

Change the default seeding -- use 8 bits of sub-second precision and

fold in the higest 8 bits of the time as well.
üst b6685dcf
......@@ -49,7 +49,8 @@ class whrandom:
if 0 == x == y == z:
# Initialize from current time
import time
t = int(time.time() % 0x80000000)
t = long(time.time() * 256)
t = int((t&0xffffff) | (t>>24))
t, x = divmod(t, 256)
t, y = divmod(t, 256)
t, z = divmod(t, 256)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment