1
0
mirror of https://github.com/danog/amp.git synced 2024-12-12 09:29:45 +01:00

Change time units to integer and milliseconds

This commit is contained in:
Niklas Keller 2016-05-12 12:28:46 +02:00
parent d781ac94d6
commit 8baea83f30

View File

@ -31,17 +31,17 @@ interface EventLoopDriver
* Delay the execution of a callback. The time delay is approximate and accuracy is not guaranteed. * Delay the execution of a callback. The time delay is approximate and accuracy is not guaranteed.
* *
* @param callable $callback The callback to delay. * @param callable $callback The callback to delay.
* @param float $time The amount of time, in seconds, to delay the execution for. * @param int $delay The amount of time, in milliseconds, to delay the execution for.
* *
* @return string An identifier that can be used to cancel, enable or disable the event. * @return string An identifier that can be used to cancel, enable or disable the event.
*/ */
public function delay(callable $callback, $time); public function delay(callable $callback, $delay);
/** /**
* Repeatedly execute a callback. The interval between executions is approximate and accuracy is not guaranteed. * Repeatedly execute a callback. The interval between executions is approximate and accuracy is not guaranteed.
* *
* @param callable $callback The callback to repeat. * @param callable $callback The callback to repeat.
* @param float $interval The time interval, in seconds, to wait between executions. * @param int $interval The time interval, in milliseconds, to wait between executions.
* *
* @return string An identifier that can be used to cancel, enable or disable the event. * @return string An identifier that can be used to cancel, enable or disable the event.
*/ */