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());
69
69
70
70
71
71
// Test second parameter, should wait 2 seconds because no notify is queued
72
- $ t = microtime (1 );
72
+ $ t = microtime (true );
73
73
$ notify = $ db ->pgsqlGetNotify (PDO ::FETCH_ASSOC , 1000 );
74
- $ diff = microtime (1 ) - $ t ;
74
+ $ diff = microtime (true ) - $ t ;
75
75
var_dump ($ diff >= 1 || 1 - abs ($ diff ) < .05 );
76
76
var_dump ($ notify );
77
77
78
78
// Test second parameter, should return immediately because a notify is queued
79
79
$ db ->exec ("NOTIFY channel_getnotify " );
80
- $ t = microtime (1 );
80
+ $ t = microtime (true );
81
81
$ notify = $ db ->pgsqlGetNotify (PDO ::FETCH_ASSOC , 5000 );
82
- $ diff = microtime (1 ) - $ t ;
82
+ $ diff = microtime (true ) - $ t ;
83
83
var_dump ($ diff < 1 || abs (1 - abs ($ diff )) < .05 );
84
84
var_dump (count ($ notify ));
85
85
You can’t perform that action at this time.
0 commit comments