We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2eb39a commit b6064cbCopy full SHA for b6064cb
1 file changed
src/Coroutine/Sleep.php
@@ -17,12 +17,12 @@ class Sleep extends Base
17
public $__sleepTime;
18
19
/**
20
- * @param int $sleepTime 时间,单位为毫秒
+ * @param int $mSec 时间,单位为毫秒
21
+ * @return $this
22
*/
- public function __construct($sleepTime)
23
+ public function goSleep(int $mSec)
24
{
- $this->__sleepTime = $sleepTime;
25
- parent::__construct(0);
+ $this->__sleepTime = $mSec;
26
$this->requestId = $this->getContext()->getLogId();
27
28
getInstance()->scheduler->IOCallBack[$this->requestId][] = $this;
@@ -38,6 +38,7 @@ public function __construct($sleepTime)
38
$this->ioBack = true;
39
$this->nextRun();
40
});
41
+ return $this;
42
}
43
44
0 commit comments