LibLatency

Addons
6,560 Downloads Last Updated: Jun 25, 2019 Game Version: 8.2.0

A library for transmitting and receiving latency information of players.

API

LL:Register(addon, function)

addon - The name of your addon (string) or your addon object (table)
function - The name of function tied to the addon object (string) or a function reference

LL:Unregister(addon)

addon - The name of your addon (string) or your addon object (table)

LL:RequestLatency(channel)

channel - The name of the channel to request latency on (string) or nil/false/no value for automatic.

  • Valid channels are GUILD, INSTANCE_CHAT, RAID, PARTY.
  • Automatic channel selection only considers the 3 group channels, it doesn't consider the GUILD channel.

Example:

local LL = LibStub("LibLatency")
local function update(latencyHome, latencyWorld, sender, channel)
	print(format("User %s has a home latency of %d and a world latency of %d!", sender, latencyHome, latencyWorld))
end
LL:Register("myAddOnNameOrObject", update)
LL:RequestLatency("GUILD")