Reference › Function reference › Conditions

Conditions.totem.remaining

dependency

Call as

Conditions.totem.remaining(record, start)

Record the dependency Conditions.totem.remaining, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.

What it does

Seconds left on a totem slot record at time start (or now): zero when the totem is inactive, and never negative.

Arguments

NameTypeWhat it does
recordtableTotem record with active, startTime and duration fields.
startnumber | nilTime to measure from; nil uses GetTime().

Returns

1numberRemaining seconds.

Editions

Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.

  • Not available on that edition (the reason is in the tooltip)
  • Only while Blizzard's deprecation fallbacks are on
Game APIClassic EraTBC AnniversaryClassic progressionForeverRetail
GetTimeClassic EraTBC AnniversaryClassic progressionForeverRetail

How the addon calls it

Source

Conditions/totem.lua, line 62. Read only in game; Duplicate makes an editable copy.

Conditions.totem.remaining(record, start)
    if not record.active then return 0 end
    return math.max(0,record.startTime+record.duration-(start or GetTime()))

Back to Function reference