This language bar is your friend. Select your favorite languages!

Idiom #70 Use clock as random generator seed

Get the current datetime and provide it as a seed to a random generator. The generator sequence will be different at each run.

#Edit dateEdit SummaryEditor
👁 Δ 25 2017-01-08, 12:46 Less confusion (date can mean "day") programming-idioms.org
👁 Δ 24 2016-11-05, 03:00 [Lua] forgot to expllain stuff Nepta
👁 Δ 23 2016-11-05, 02:59 New Lua implementation by user [Nepta] Nepta
👁 Δ 22 2016-02-22, 15:29 [Go] Conciser imports
👁 Δ 21 2016-02-22, 15:28 [Go] Conciser imports
👁 Δ 20 2016-02-22, 14:43 New PHP implementation by user [Feifan]
👁 Δ 19 2016-02-18, 16:58 New Java implementation by user [lck]
👁 Δ 18 2016-01-04, 04:27 New Java implementation by user [lck]
👁 Δ 17 2015-12-30, 17:06 [Go] +DocURL to rand.NewSource
👁 Δ 16 2015-12-30, 17:04 [Go] +DocURL
👁 Δ 15 2015-11-30, 12:37
👁 Δ 14 2015-10-31, 14:53
👁 Δ 13 2015-10-29, 14:05
👁 Δ 12 2015-09-05, 07:42
👁 Δ 11 2015-09-03, 16:42
👁 Δ 10 2015-08-22, 22:50
👁 Δ 9 2015-08-22, 22:16
👁 Δ 8 2015-08-20, 16:24
👁 Δ 7 2015-08-20, 16:24
👁 Δ 6 2015-08-20, 16:22
👁 Δ 5 2015-08-20, 11:28
👁 Δ 4 2015-08-01, 00:25
👁 Δ 3 2015-07-31, 23:42
👁 Δ 2 2015-07-31, 23:41
1 2015-07-31, 23:41