Skip to content

Commit 853a42b

Browse files
committed
fix adaptive sleep float convert bug
1 parent f9a0be8 commit 853a42b

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/OneBot/Driver/Coroutine/Adaptive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function sleep($time)
5050
return;
5151
}
5252
if (self::$coroutine instanceof FiberCoroutine) {
53-
WorkermanDriver::getInstance()->getEventLoop()->addTimer($time * 1000, function () use ($cid) {
53+
WorkermanDriver::getInstance()->getEventLoop()->addTimer(intval($time * 1000), function () use ($cid) {
5454
self::$coroutine->resume($cid);
5555
});
5656
self::$coroutine->suspend();

src/OneBot/V12/Object/MessageSegment.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace OneBot\V12\Object;
66

7-
use ReturnTypeWillChange;
8-
97
class MessageSegment implements \JsonSerializable, \IteratorAggregate
108
{
119
/** @var string 类型 */

src/OneBot/global_defines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use ZM\Logger\ConsoleLogger;
1414

1515
const ONEBOT_VERSION = '12';
16-
const ONEBOT_LIBOB_VERSION = '0.5.10';
16+
const ONEBOT_LIBOB_VERSION = '0.5.11';
1717

1818
const ONEBOT_JSON = 1;
1919
const ONEBOT_MSGPACK = 2;

0 commit comments

Comments
 (0)