all repos — honk @ 8f4ed81333e2e8c1ac2bcef39c0b61f1f6cd33f7

my fork of honk

math/rand is notrand. seed it with time.
Ted Unangst tedu@tedunangst.com
Mon, 15 Apr 2019 20:47:16 -0400
commit

8f4ed81333e2e8c1ac2bcef39c0b61f1f6cd33f7

parent

3d737e24c7cfdd4f2de8c6306ebb7d8f92d9f602

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M deliverator.godeliverator.go

@@ -17,9 +17,13 @@ package main

import ( "log" - "math/rand" + notrand "math/rand" "time" ) + +func init() { + notrand.Seed(time.Now().Unix()) +} type Doover struct { ID int64

@@ -41,7 +45,7 @@ default:

log.Printf("he's dead jim: %s", rcpt) return } - drift += time.Duration(rand.Int63n(int64(drift / 10))) + drift += time.Duration(notrand.Int63n(int64(drift / 10))) when := time.Now().UTC().Add(drift) stmtAddDoover.Exec(when.Format(dbtimeformat), goarounds, username, rcpt, msg) select {