Skip to content

Commit 303965d

Browse files
authored
Merge pull request #14 from wanick/v1.0.5
fix change variables name on loop
2 parents a8fccfd + 694c799 commit 303965d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Drivers/Driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public function __construct($url, $options = [])
4242
/**
4343
* Add loop function with minimal interval call
4444
*/
45-
public function onLoop($callback, $millisecond = 1000000)
45+
public function onLoop($callback, $microsecond = 1000000)
4646
{
47-
$this->ws->onLoop($callback, $millisecond);
47+
$this->ws->onLoop($callback, $microsecond);
4848
return $this;
4949
}
5050

src/WebSocket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ public function onMessage($callback)
5959
{
6060
$this->listeners[] = $callback;
6161
}
62-
public function onLoop($callback, $millisecond = 1000)
62+
public function onLoop($callback, $microsecond = 1000)
6363
{
6464
$this->loops[] = [
6565
'last' => 0,
66-
'interval' => $millisecond,
66+
'interval' => $microsecond,
6767
'callback' => $callback
6868
];
6969
}

0 commit comments

Comments
 (0)