@@ -94,7 +94,7 @@ public function isTimerActive(TimerInterface $timer);
9494 *
9595 * @param callable $listener
9696 */
97- public function startTick (callable $ listener );
97+ public function onStart (callable $ listener );
9898
9999 /**
100100 * Schedule a callback to be invoked on the stop tick of event loop.
@@ -103,7 +103,17 @@ public function startTick(callable $listener);
103103 *
104104 * @param callable $listener
105105 */
106- public function stopTick (callable $ listener );
106+ public function onStop (callable $ listener );
107+
108+ /**
109+ * Schedule a callback to be invoked on a future tick of the event loop.
110+ *
111+ * Callbacks are guaranteed to be executed in the order they are enqueued. This method is an alias for onAfterTick()
112+ * method.
113+ *
114+ * @param callable $listener
115+ */
116+ public function onTick (callable $ listener );
107117
108118 /**
109119 * Schedule a callback to be invoked on the next tick of the event loop.
@@ -112,7 +122,7 @@ public function stopTick(callable $listener);
112122 *
113123 * @param callable $listener
114124 */
115- public function beforeTick (callable $ listener );
125+ public function onBeforeTick (callable $ listener );
116126
117127 /**
118128 * Schedule a callback to be invoked on a future tick of the event loop.
@@ -121,5 +131,5 @@ public function beforeTick(callable $listener);
121131 *
122132 * @param callable $listener
123133 */
124- public function afterTick (callable $ listener );
134+ public function onAfterTick (callable $ listener );
125135}
0 commit comments