diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-07-31 05:13:09 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-07-31 05:13:09 +0000 |
commit | e121266a67b6adeedf5f350d883dc8bf8ea1a4a8 (patch) | |
tree | e529ccd96dcec403e3ab582016be702df3b46b57 | |
parent | 62d84ae7dbf17f958fadaf54eb348d051a02c678 (diff) |
use monotonic time for repeat event detections; feedback and ok deraadt@
-rw-r--r-- | sys/dev/rnd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index 2c71cd0ec74..94d7ab4cd6e 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.78 2005/07/07 00:11:24 djm Exp $ */ +/* $OpenBSD: rnd.c,v 1.79 2005/07/31 05:13:08 djm Exp $ */ /* * rnd.c -- A strong random number generator @@ -738,7 +738,7 @@ enqueue_randomness(state, val) val += state << 13; microtime(&tv); - time = tv.tv_usec ^ tv.tv_sec; + time = tv.tv_usec + (tv.tv_sec << 20); nbits = 0; /* |