Overview

Namespaces

  • Budabot
    • Core
      • Modules
    • User
      • Modules
  • None
  • Tyrence
    • Modules

Classes

  • AccessManager
  • AdminManager
  • AOChat
  • AOChatPacket
  • AOChatQueue
  • AOExtMsg
  • AsyncHttp
  • AutoInject
  • BotRunner
  • Budabot
  • BuddylistManager
  • CacheManager
  • CacheResult
  • ClassLoader
  • ColorSettingHandler
  • CommandAlias
  • CommandManager
  • ConfigFile
  • DB
  • DBRow
  • EventLoop
  • EventManager
  • GuildChannelCommandReply
  • GuildManager
  • HelpManager
  • Http
  • HttpRequest
  • LegacyLogger
  • LimitsController
  • LoggerWrapper
  • MMDBParser
  • NumberSettingHandler
  • OptionsSettingHandler
  • PlayerHistory
  • PlayerHistoryManager
  • PlayerManager
  • Preferences
  • PrivateChannelCommandReply
  • PrivateMessageCommandReply
  • Registry
  • SettingHandler
  • SettingManager
  • SettingObject
  • SocketManager
  • SocketNotifier
  • SubcommandManager
  • Text
  • TextSettingHandler
  • Timer
  • TimerEvent
  • TimeSettingHandler
  • Util
  • xml

Interfaces

  • CommandReply

Exceptions

  • InvalidHttpRequest
  • SQLException
  • StopExecutionException

Functions

  • isWindows
  • Overview
  • Namespace
  • Class

Class Timer

Namespace: Budabot\Core
Instance
Located at Timer.class.php
Methods summary
public
# executeTimerEvents( )
public Budabot\Core\TimerEvent
# callLater( integer $delay, callable $callback )

Calls given callback asynchronously after $delay seconds.

Calls given callback asynchronously after $delay seconds.

The callback has following signature:

function callback(...)
  • ... - optional values which are same as given as arguments to this method.

Example usage:

$this->util->callLater(5, function($message) {
    print $message;
}, 'Hello World');

Prints 'Hello World' after 5 seconds.

Parameters

$delay
time in seconds to delay the call
$callback
callback which is called after timeout

Returns

Budabot\Core\TimerEvent
private
# addTimerEvent( $delay, $callback, $args )

Adds new timer event. $callback will be called with arguments $args array after $delay seconds.

Adds new timer event. $callback will be called with arguments $args array after $delay seconds.

private
# sortEventsByTime( )
Properties summary
private array $timerEvents
# array()
Budabot 4 Docs API documentation generated by ApiGen