NodeGuy/server-date

Question

warrenkc opened this issue · 1 comments

Awesome work by the way.
I am trying to get my countdown timer to work with the server time.
Is there a way to know when ServerDate is ready to be used? Thank you so much.
Right now, it works only if I wait 3 seconds like this:

setTimeout(function () { createTimer(endDate); }, 3000);

Sample shown here: https://xpertdatetime.com/countdown/

You can try setting ServerDate.amortizationThreshold = 0 to make the server's time available immediately.