of the boundary chosen by choose_boudary() by using milliseconds
of the timestamp.
def choose_boundary():
global _prefix
import time
- import rand
+ import whrandom
if _prefix == None:
import socket
import os
pid = `os.getpid()`
except:
pid = '1'
- seed = `rand.rand()`
_prefix = hostid + '.' + uid + '.' + pid
- timestamp = `int(time.time())`
- seed = `rand.rand()`
+ timestamp = '%.3f' % time.time()
+ seed = `whrandom.randint(0, 32767)`
return _prefix + '.' + timestamp + '.' + seed