Skip to content

Commit

Permalink
fix adaptive sleep float convert bug
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc committed Feb 20, 2023
1 parent f9a0be8 commit 853a42b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/OneBot/Driver/Coroutine/Adaptive.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function sleep($time)
return;
}
if (self::$coroutine instanceof FiberCoroutine) {
WorkermanDriver::getInstance()->getEventLoop()->addTimer($time * 1000, function () use ($cid) {
WorkermanDriver::getInstance()->getEventLoop()->addTimer(intval($time * 1000), function () use ($cid) {
self::$coroutine->resume($cid);
});
self::$coroutine->suspend();
Expand Down
2 changes: 0 additions & 2 deletions src/OneBot/V12/Object/MessageSegment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace OneBot\V12\Object;

use ReturnTypeWillChange;

class MessageSegment implements \JsonSerializable, \IteratorAggregate
{
/** @var string 类型 */
Expand Down
2 changes: 1 addition & 1 deletion src/OneBot/global_defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use ZM\Logger\ConsoleLogger;

const ONEBOT_VERSION = '12';
const ONEBOT_LIBOB_VERSION = '0.5.10';
const ONEBOT_LIBOB_VERSION = '0.5.11';

const ONEBOT_JSON = 1;
const ONEBOT_MSGPACK = 2;
Expand Down

0 comments on commit 853a42b

Please sign in to comment.