diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index e9950215705..ff28703e8d8 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -941,7 +941,6 @@ class auth_plugin_mnet extends auth_plugin_base { // run the keepalive client $this->keepalive_client(); - // admin/cron.php should have run srand for us $random100 = rand(0,100); if ($random100 < 10) { // Approximately 10% of the time. // nuke olden sessions diff --git a/lib/adodb/adodb.inc.php b/lib/adodb/adodb.inc.php index d0c2695f62e..11b5ef20d3a 100644 --- a/lib/adodb/adodb.inc.php +++ b/lib/adodb/adodb.inc.php @@ -169,11 +169,6 @@ die("Illegal path http:// or ftp://"); } - - // Initialize random number generator for randomizing cache flushes - // -- note Since PHP 4.2.0, the seed becomes optional and defaults to a random value if omitted. - srand(((double)microtime())*1000000); - /** * ADODB version as a string. */ diff --git a/lib/cronlib.php b/lib/cronlib.php index 552398be4b7..8b5e40d978e 100644 --- a/lib/cronlib.php +++ b/lib/cronlib.php @@ -66,7 +66,6 @@ function cron_run() { // Run cleanup core cron jobs, but not every time since they aren't too important. // These don't have a timer to reduce load, so we'll use a random number // to randomly choose the percentage of times we should run these jobs. - srand ((double) microtime() * 10000000); $random100 = rand(0,100); if ($random100 < 20) { // Approximately 20% of the time. mtrace("Running clean-up tasks..."); diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 4179c7d8885..d677f26d2aa 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -7969,7 +7969,6 @@ function unformat_float($localefloat, $strict = false) { */ function swapshuffle($array) { - srand ((double) microtime() * 10000000); $last = count($array) - 1; for ($i = 0; $i <= $last; $i++) { $from = rand(0, $last); @@ -8009,7 +8008,6 @@ function swapshuffle_assoc($array) { * @return array */ function draw_rand_array($array, $draws) { - srand ((double) microtime() * 10000000); $return = array(); diff --git a/lib/tests/accesslib_test.php b/lib/tests/accesslib_test.php index b1cba20ede1..80df165c0b3 100644 --- a/lib/tests/accesslib_test.php +++ b/lib/tests/accesslib_test.php @@ -2274,8 +2274,6 @@ class core_accesslib_testcase extends advanced_testcase { $userids = array_slice($userids, 0, 5); } - // Random time! - // srand(666); foreach ($userids as $userid) { // No guest or deleted. // Each user gets 0-10 random roles. $rcount = rand(0, 10);