I am making a small addon to display the amount of time I have been waiting for a dungeon or Raid Finder along with the wait time I was supposed to be waiting for when I joined the Q in the label of an LDB plugin. I have begun with the following code and am frustrated so far:
Code:
hasData, leaderNeeds, tankNeeds, healerNeeds, dpsNeeds, instanceType, instanceName, averageWait, tankWait, healerWait, damageWait, myWait, queuedTime = GetLFGQueueStats()
if hasData then -- we are in the Q
-- get the time we haved waited, and the estimated time we are supposed to wait and output them.
lfgWaited = GetTime() - queuedTime;
end
I would like to format the time into human readable numbers instead of the seconds, but am unsure how to do this (so it read something like "4:05 / 16:30" to show I have been waiting 4 minutes and 5 seconds out of the expected 16 minutes and 30 seconds). Also, there seems to be a few events revolving around queue status updates, and I am wondering which one I should be checking for? LFG_QUEUE_STATUS_UPDATE seems like it would be the one, but I am unable to find any information about it using WoWWiki, WoWPedia, or WowProgramming.com. Anyways, any help would be hot. Thanks MMO-Champion.