From e121266a67b6adeedf5f350d883dc8bf8ea1a4a8 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 31 Jul 2005 05:13:09 +0000 Subject: use monotonic time for repeat event detections; feedback and ok deraadt@ --- sys/dev/rnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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; /* -- cgit v1.2.3