public function __construct(LoopModelInterface $loop, $interval, callable $callback, $periodic = false, $data = null)
{
if ($interval < self::MIN_INTERVAL) {
$interval = self::MIN_INTERVAL;
}
$this->loop = $loop;
$this->interval = (double) $interval;
$this->callback = $callback;
$this->periodic = (bool) $periodic;
$this->data = $data;
}