mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
Rename TestSessionState::microtime to millitime
This commit is contained in:
parent
32c8e6a3b1
commit
f54baefb5a
@ -573,11 +573,11 @@ class TestSessionEnvironment
|
||||
*/
|
||||
public function waitForPendingRequests($await = 700, $timeout = 10000)
|
||||
{
|
||||
$timeout = TestSessionState::microtime() + $timeout;
|
||||
$timeout = TestSessionState::millitime() + $timeout;
|
||||
$interval = max(300, $await);
|
||||
|
||||
do {
|
||||
$now = TestSessionState::microtime();
|
||||
$now = TestSessionState::millitime();
|
||||
|
||||
if ($timeout < $now) {
|
||||
return false;
|
||||
|
@ -53,7 +53,7 @@ class TestSessionState extends DataObject
|
||||
$update = SQLUpdate::create(sprintf('"%s"', $schema->tableName(self::class)))
|
||||
->addWhere(['ID' => 1])
|
||||
->assignSQL('"PendingRequests"', '"PendingRequests" - 1')
|
||||
->assign('"LastResponseTimestamp"', self::microtime());
|
||||
->assign('"LastResponseTimestamp"', self::millitime());
|
||||
|
||||
$update->execute();
|
||||
}
|
||||
@ -63,7 +63,7 @@ class TestSessionState extends DataObject
|
||||
*
|
||||
* @return float milliseconds since 1970
|
||||
*/
|
||||
public static function microtime()
|
||||
public static function millitime()
|
||||
{
|
||||
return round(microtime(true) * 1000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user