Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set default timezone, correct sub-second sleeps

  • Loading branch information...
commit b66d2ce0d0f3d85d56ac64e7d35d0b9c85271c90 1 parent 8a5646c
@trevyn trevyn authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 demo/demo.php
View
8 demo/demo.php
@@ -1,5 +1,7 @@
<?
+date_default_timezone_set("UTC");
+
require "../profiler.php";
Profiler::enable();
@@ -10,19 +12,19 @@
$s1 = Profiler::start('Step 1');
//do some important things!
-sleep(.5);
+usleep(500000); // 0.5 sec
$s1->end();
$s2 = Profiler::start('Step 2');
//more important things
-sleep(.1);
+usleep(100000); // 0.1 sec
$s3 = Profiler::start('Step 3');
//some nested things..that are important and stuff.
sleep(1);
$sql = Profiler::sqlStart("SELECT * FROM TABLE WHERE 1");
- sleep(1.5);
+ usleep(1500000); // 1.5 sec
$sql->end();
$s3->end();
Please sign in to comment.
Something went wrong with that request. Please try again.