Maybe something along the lines of:
Lua Code:
local usable, _ = IsUsableSpell(spellName)
local start, duration = GetSpellCooldown(spellName)
local ignore, gcd = GetSpellCooldown(61304)
if (usable) then
if (duration == 0 and (start < ignore)) or (duration <= gcd) then --ignore global cooldown
--show icon
Frame.endTime = start + duration
end
else
if not Frame.endTime or Frame.endTime <= GetTime() then
Frame:Hide() -- only if it's not still ticking
end
end