Thread Tools Display Modes
Today, 10:59 AM   #1
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 279
GetNextForwardCampRespawnTime() time format?

Hi i'm looking to add a very basic slash command to my addon that basically subtracts current time from GetNextForwardCampRespawnTime() to give me a value I can convert to seconds or something but... all the GetTimeStamp() or GetTimeStamp32() etc api functions I can find return a 10 digit number vs GetNextForwardCampRespawnTime() returning a 7 digit number. Is there another api function I should use for this or is the GetNextForwardCampRespawnTime() being rounded up to the nearest minute or something?
  Reply With Quote
Today, 11:54 AM   #2
Anthonysc
AddOn Author - Click to view addons
Join Date: Jan 2022
Posts: 17
Originally Posted by sinnereso View Post
Hi i'm looking to add a very basic slash command to my addon that basically subtracts current time from GetNextForwardCampRespawnTime() to give me a value I can convert to seconds or something but... all the GetTimeStamp() or GetTimeStamp32() etc api functions I can find return a 10 digit number vs GetNextForwardCampRespawnTime() returning a 7 digit number. Is there another api function I should use for this or is the GetNextForwardCampRespawnTime() being rounded up to the nearest minute or something?
This is what RDK does for its Camp Respawn Timer:

Code:
local respawnTime = GetNextForwardCampRespawnTime()
local seconds = (respawnTime - GetGameTimeMilliseconds()) / 1000
if seconds < 0 then
	respawnTime = "-"
else
	respawnTime = ZO_FormatTimeAsDecimalWhenBelowThreshold(seconds)
end
  Reply With Quote
Today, 12:03 PM   #3
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 279
Originally Posted by Anthonysc View Post
This is what RDK does for its Camp Respawn Timer:

Code:
local respawnTime = GetNextForwardCampRespawnTime()
local seconds = (respawnTime - GetGameTimeMilliseconds()) / 1000
if seconds < 0 then
	respawnTime = "-"
else
	respawnTime = ZO_FormatTimeAsDecimalWhenBelowThreshold(seconds)
end
oh ty.. didnt think it would be as simple as /1000.. I thought of it but wanted to make sure there was a more ideal or proper way.. ty
  Reply With Quote

ESOUI » AddOns » Released AddOns » GetNextForwardCampRespawnTime() time format?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off