1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
Timer.php
См. документацию.
1
<?php
2
declare(strict_types=1);
3
4
namespace
Bitrix\Landing\Copilot\Generation;
5
9
class
Timer
10
{
11
private
const
MAX_EXECUTION_TIME = 30;
12
13
private
int
$startTime;
14
19
public
function
start
(): void
20
{
21
$this->startTime = (int)microtime(
true
);
22
}
23
28
public
function
check
(): bool
29
{
30
if
(!isset($this->startTime))
31
{
32
return
true
;
33
}
34
35
return
((
int
)microtime(
true
) - $this->startTime) < self::MAX_EXECUTION_TIME;
36
}
37
}
Bitrix\Landing\Copilot\Generation\Timer
Определения
Timer.php:10
Bitrix\Landing\Copilot\Generation\Timer\check
check()
Определения
Timer.php:28
Bitrix\Landing\Copilot\Generation\Timer\start
start()
Определения
Timer.php:19
bitrix
modules
landing
lib
Copilot
Generation
Timer.php
Создано системой
1.14.0