diff options
Diffstat (limited to 'examples/random-jobs.scm')
-rw-r--r-- | examples/random-jobs.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/random-jobs.scm b/examples/random-jobs.scm index 9918cd1..9d26892 100644 --- a/examples/random-jobs.scm +++ b/examples/random-jobs.scm @@ -33,10 +33,11 @@ (let ((nonce (random 1e6))) (run-with-store store (gexp->derivation "random" - #~(let ((seed (logxor (getpid) - (car (gettimeofday))))) - (seed->random-state seed) - (sleep (pk 'sleeping (random 10))) + #~(let* ((seed (logxor #$(cdr (gettimeofday)) + (car (gettimeofday)) + (cdr (gettimeofday)))) + (state (seed->random-state seed))) + (sleep (pk 'sleeping (random 10 state))) #$nonce (mkdir #$output)))))) |