This commit is contained in:
2021-08-13 14:58:58 +08:00
parent 15851ba97c
commit 2432b98be5
13 changed files with 90 additions and 151 deletions
+5 -4
View File
@@ -9,6 +9,7 @@ use JetBrains\PhpStorm\Pure;
use Server\SInterface\CustomProcess;
use Kiri\Kiri;
use Swoole\Timer;
use Swoole\Process;
/**
* Class Biomonitoring
@@ -19,10 +20,10 @@ class Biomonitoring implements CustomProcess
/**
* @param \Swoole\Process $process
* @param Process $process
* @return string
*/
#[Pure] public function getProcessName(\Swoole\Process $process): string
#[Pure] public function getProcessName(Process $process): string
{
// TODO: Implement getProcessName() method.
return get_called_class();
@@ -30,10 +31,10 @@ class Biomonitoring implements CustomProcess
/**
* @param \Swoole\Process $process
* @param Process $process
* @throws Exception
*/
public function onHandler(\Swoole\Process $process): void
public function onHandler(Process $process): void
{
$server = Kiri::app()->getSwoole();
Timer::tick(1000, function () use ($server) {