mirror of
https://github.com/danog/amp.git
synced 2024-12-04 18:38:17 +01:00
Merge pull request #21 from kelunik/time-units
Change time units to integer and milliseconds
This commit is contained in:
commit
19e4c8f58b
@ -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.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user