diff options
Diffstat (limited to 'philo.go')
-rw-r--r-- | philo.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -91,6 +91,11 @@ func prepare(n int) []chan bool { return forks } +func init() { + now := time.Now().Unix() + rand.Seed(now) +} + func main() { fmt.Println(len(philo), "philosophers dining") defer fmt.Println("Table is empty") |