castremaining

Returns the percentage or absolute time remaining of a spell cast on a unit.

Defaults unit Player and time to false.

Time forces it to return the absolute time, leave out for percentage.

castremaining([unit, time]) : number

Example

if castremaining('pet') < 30 then
-- Interrupt them!.
end