Rename TestSessionState::microtime to millitime

This commit is contained in:
Serge Latyntcev 2019-01-10 15:30:39 +13:00
parent 32c8e6a3b1
commit f54baefb5a
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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);
}