There are two use cases in Blizzard's implementation: alternate power and buff timers
Alternate Power can be visually represented as pills, circle, counter or a vertical or horizontal bar. See the
barType return of
UnitAlternatePowerInfo (
reference). BTW there are enough boss encounters where you should be interested in the alternate power of your raid members.
For an example of how you could handle this see
oUF's alternativepower element. It uses the StatusBar widget but layouts could easily provide their own.
The second use case are buff timers, but just for special buffs that are tied to this system. Here comes the
UnitPowerBarTimerInfo API. The returns are as follows:
duration - full duration of the buff in seconds (e.g. 60)
expiration - the time when the buff expires (use
expiration - GetTime() to get the remaining time of the buff)
barID - the alternate power id of the timer (you could use
GetAlternatePowerInfoByID with this)
auraID - the spellID of the timer buff (you could use
GetSpellInfo with this)
For an example implementation of this see
oUF's not yet included playerbufftimers element.
The player buff timers are currently only used for Darkmoon Fair quests (at least to my knowledge) and they all have normal buffs you can use to track duration (whose IDs are different than the above auraID btw), so currently the system is just visual clutter.
The index argument for UnitPowerBarTimerInfo is like the aura index in UnitAura. It is the position of the timer, starting at 1. Currently at most 1 timer is used, but this may change.