1
0
mirror of https://github.com/golang/go synced 2024-11-21 16:04:45 -07:00

doc: fix codewalk/markov.go

When I build it, I got:
/home/njubee/work/golang/doc/codewalk/markov.go:124: undefined: time.Nanoseconds
time.Nanoseconds() does not exist now, use time.Now().UnixNano() instead

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5668044
This commit is contained in:
Lai Jiangshan 2012-02-15 13:07:34 +11:00 committed by Andrew Gerrand
parent 4853cb9ab0
commit 932cdfbc4c

View File

@ -121,7 +121,7 @@ func main() {
prefixLen := flag.Int("prefix", 2, "prefix length in words")
flag.Parse() // Parse command-line flags.
rand.Seed(time.Nanoseconds()) // Seed the random number generator.
rand.Seed(time.Now().UnixNano()) // Seed the random number generator.
c := NewChain(*prefixLen) // Initialize a new Chain.
c.Build(os.Stdin) // Build chains from standard input.