]> granicus.if.org Git - php/commitdiff
Adding microtime() tests
authorJames Moore <jmoore@php.net>
Sun, 4 Feb 2001 16:56:59 +0000 (16:56 +0000)
committerJames Moore <jmoore@php.net>
Sun, 4 Feb 2001 16:56:59 +0000 (16:56 +0000)
ext/standard/tests/time/001.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/time/001.phpt b/ext/standard/tests/time/001.phpt
new file mode 100644 (file)
index 0000000..004a498
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+microtime() function
+--POST--
+--GET--
+--FILE--
+<?php
+$passed = 0;
+$failed = 0;
+for ($i=1;$i<=100000;$i++)    {
+   list($micro,$time)=explode(" ",microtime());
+   $add=$micro+$time;
+   $add<$last ? $failed++: $passed++;
+   $last=$add; }
+echo "Passed: ".$passed."\n";
+echo "Failed: ".$failed."\n";
+?>
+--EXPECT--
+Passed: 100000
+Failed: 0
\ No newline at end of file