File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -69,17 +69,17 @@ var_dump($db->pgsqlGetNotify());
6969
7070
7171// Test second parameter, should wait 2 seconds because no notify is queued
72- $ t = microtime (1 );
72+ $ t = microtime (true );
7373$ notify = $ db ->pgsqlGetNotify (PDO ::FETCH_ASSOC , 1000 );
74- $ diff = microtime (1 ) - $ t ;
74+ $ diff = microtime (true ) - $ t ;
7575var_dump ($ diff >= 1 || 1 - abs ($ diff ) < .05 );
7676var_dump ($ notify );
7777
7878// Test second parameter, should return immediately because a notify is queued
7979$ db ->exec ("NOTIFY channel_getnotify " );
80- $ t = microtime (1 );
80+ $ t = microtime (true );
8181$ notify = $ db ->pgsqlGetNotify (PDO ::FETCH_ASSOC , 5000 );
82- $ diff = microtime (1 ) - $ t ;
82+ $ diff = microtime (true ) - $ t ;
8383var_dump ($ diff < 1 || abs (1 - abs ($ diff )) < .05 );
8484var_dump (count ($ notify ));
8585
You can’t perform that action at this time.
0 commit comments