# FrameAPICooldown (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/FrameAPICooldown

## Functions

### Clear

```lua
self:Clear()
```

Protected: only Blizzard's own code may call it.

### GetCooldownDisplayDuration

```lua
duration = self:GetCooldownDisplayDuration()
```

The returned duration unit is milliseconds, unaffected by modRate.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `duration`: number

### GetCooldownDuration

```lua
duration = self:GetCooldownDuration()
```

The returned duration unit is milliseconds and is multiplied by the modRate.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `duration`: number

### GetCooldownTimes

```lua
start, duration = self:GetCooldownTimes()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `start`: number
- `duration`: number

### GetCountdownAbbrevThreshold

```lua
seconds = self:GetCountdownAbbrevThreshold()
```

Returns the threshold below which cooldown numbers are displayed as an abbreviated form without a unit suffix (eg. '1:31').

Returns:
- `seconds`: Seconds

### GetCountdownFontString

```lua
countdownString = self:GetCountdownFontString()
```

Returns:
- `countdownString`: SimpleFontString

### GetCountdownFormatter

```lua
formatter = self:GetCountdownFormatter()
```

Returns:
- `formatter`: NumericFormatter, may be nil

### GetCountdownMillisecondsThreshold

```lua
seconds = self:GetCountdownMillisecondsThreshold()
```

Returns the threshold below which cooldown numbers are displayed as a decimal value with one place for milliseconds (eg. '8.7').

Returns:
- `seconds`: Seconds

### GetDrawBling

```lua
drawBling = self:GetDrawBling()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `drawBling`: bool

### GetDrawEdge

```lua
drawEdge = self:GetDrawEdge()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `drawEdge`: bool

### GetDrawSwipe

```lua
drawSwipe = self:GetDrawSwipe()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `drawSwipe`: bool

### GetEdgeScale

```lua
edgeScale = self:GetEdgeScale()
```

Returns:
- `edgeScale`: number

### GetHideCountdownNumbers

```lua
hideNumbers = self:GetHideCountdownNumbers()
```

Returns:
- `hideNumbers`: bool

### GetMinimumCountdownDuration

```lua
milliseconds = self:GetMinimumCountdownDuration()
```

Returns:
- `milliseconds`: Milliseconds

### GetReverse

```lua
reverse = self:GetReverse()
```

Returns:
- `reverse`: bool

### GetRotation

```lua
rotationRadians = self:GetRotation()
```

Returns:
- `rotationRadians`: number

### GetUseAuraDisplayTime

```lua
useAuraDisplayTime = self:GetUseAuraDisplayTime()
```

Returns:
- `useAuraDisplayTime`: bool

### IsPaused

```lua
isPaused = self:IsPaused()
```

Returns:
- `isPaused`: bool

### Pause

```lua
self:Pause()
```

### Resume

```lua
self:Resume()
```

### SetBlingTexture

```lua
self:SetBlingTexture(texture, colorR, colorG, colorB, colorA)
```

Arguments:
- `texture`: FileAsset
- `colorR`: number
- `colorG`: number
- `colorB`: number
- `colorA`: number

### SetCooldown

```lua
self:SetCooldown(start, duration, [modRate])
```

Protected: only Blizzard's own code may call it.

Arguments:
- `start`: Seconds
- `duration`: Seconds
- `modRate`: number, default 1

### SetCooldownDuration

```lua
self:SetCooldownDuration(duration, [modRate])
```

Protected: only Blizzard's own code may call it.

Arguments:
- `duration`: Seconds
- `modRate`: number, default 1

### SetCooldownFromDurationObject

```lua
self:SetCooldownFromDurationObject(duration, [clearIfZero])
```

Protected: only Blizzard's own code may call it.

Arguments:
- `duration`: LuaDurationObject
- `clearIfZero`: bool, default true

### SetCooldownFromExpirationTime

```lua
self:SetCooldownFromExpirationTime(expirationTime, duration, [modRate])
```

Protected: only Blizzard's own code may call it.

Arguments:
- `expirationTime`: Seconds
- `duration`: Seconds
- `modRate`: number, default 1

### SetCooldownUNIX

```lua
self:SetCooldownUNIX(start, duration, [modRate])
```

Protected: only Blizzard's own code may call it.

Arguments:
- `start`: number
- `duration`: number
- `modRate`: number, default 1

### SetCountdownAbbrevThreshold

```lua
self:SetCountdownAbbrevThreshold(seconds)
```

Sets the threshold below which cooldown numbers are displayed as an abbreviated form without a unit suffix (eg. '1:31').

Arguments:
- `seconds`: Seconds. Number of seconds below which numbers will be abbreviated. If above one hour or below one minute, no abbreviation will be performed.

### SetCountdownFont

```lua
self:SetCountdownFont(fontName)
```

Arguments:
- `fontName`: cstring

### SetCountdownFormatter

```lua
self:SetCountdownFormatter([formatter])
```

Arguments:
- `formatter`: NumericFormatter, may be nil

### SetCountdownMillisecondsThreshold

```lua
self:SetCountdownMillisecondsThreshold(seconds)
```

Sets the threshold below which cooldown numbers are displayed as a decimal value with one place for milliseconds (eg. '8.7').

Arguments:
- `seconds`: Seconds. Number of seconds below which numbers are displayed with milliseconds.

### SetDrawBling

```lua
self:SetDrawBling([drawBling])
```

Arguments:
- `drawBling`: bool, default false

### SetDrawEdge

```lua
self:SetDrawEdge([drawEdge])
```

Arguments:
- `drawEdge`: bool, default false

### SetDrawSwipe

```lua
self:SetDrawSwipe([drawSwipe])
```

Arguments:
- `drawSwipe`: bool, default false

### SetEdgeColor

```lua
self:SetEdgeColor(colorR, colorG, colorB, [a])
```

Arguments:
- `colorR`: number
- `colorG`: number
- `colorB`: number
- `a`: SingleColorValue, may be nil

### SetEdgeScale

```lua
self:SetEdgeScale(scale)
```

Arguments:
- `scale`: number

### SetEdgeTexture

```lua
self:SetEdgeTexture(texture, colorR, colorG, colorB, colorA)
```

Arguments:
- `texture`: FileAsset
- `colorR`: number
- `colorG`: number
- `colorB`: number
- `colorA`: number

### SetHideCountdownNumbers

```lua
self:SetHideCountdownNumbers([hideNumbers])
```

Arguments:
- `hideNumbers`: bool, default false

### SetMinimumCountdownDuration

```lua
self:SetMinimumCountdownDuration(milliseconds)
```

Controls the minimum duration above which countdown text will be shown. This is applied based upon the total duration of the cooldown, not the remaining duration as it ticks down.

Arguments:
- `milliseconds`: Milliseconds

### SetPaused

```lua
self:SetPaused(paused)
```

Arguments:
- `paused`: bool

### SetReverse

```lua
self:SetReverse([reverse])
```

Arguments:
- `reverse`: bool, default false

### SetRotation

```lua
self:SetRotation(rotationRadians)
```

Arguments:
- `rotationRadians`: number

### SetSwipeColor

```lua
self:SetSwipeColor(colorR, colorG, colorB, [a])
```

Arguments:
- `colorR`: number
- `colorG`: number
- `colorB`: number
- `a`: SingleColorValue, may be nil

### SetSwipeTexture

```lua
self:SetSwipeTexture([texture], colorR, colorG, colorB, colorA)
```

Arguments:
- `texture`: FileAsset, may be nil
- `colorR`: number
- `colorG`: number
- `colorB`: number
- `colorA`: number

### SetTexCoordRange

```lua
self:SetTexCoordRange(low, high)
```

Arguments:
- `low`: vector2
- `high`: vector2

### SetUseAuraDisplayTime

```lua
self:SetUseAuraDisplayTime([useAuraDisplayTime])
```

Aura durations are displayed slightly differently than cooldown durations. Setting this to true will adjust the display logic to stay in sync with aura timers.

Arguments:
- `useAuraDisplayTime`: bool, default false

### SetUseCircularEdge

```lua
self:SetUseCircularEdge([useCircularEdge])
```

Arguments:
- `useCircularEdge`: bool, default false

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
