roblox-discord-presence icon indicating copy to clipboard operation
roblox-discord-presence copied to clipboard

fix inaccurate elapsed time

Open davidkra230 opened this issue 3 years ago • 4 comments

davidkra230 avatar Jan 06 '22 01:01 davidkra230

while its true tick may be a little bit inaccurate it has a higher resolution then os.time

Screenshot 2022-01-11 at 22 28 32

os.time is accurate but lacks in precision where tick is precise but lacks in accuracy

so it just depends if the plugin needs accuracy or precision image

Baileyeatspizza avatar Jan 11 '22 22:01 Baileyeatspizza

it doesn't matter that it lacks "precision" or "accuracy"

the plugin incorrectly sets the elapsed time, fix for it is to set the os.time() or tick() on boot of the plugin (an attribute of the script) and that'd be used to get the start time.

iArxic avatar Dec 18 '22 14:12 iArxic

The inaccuracy i was referencing was that tick does not or atleast did not at the time obey timezone offsets, os.time did. i do not know if this is or was a roblox glitch but my fix did fix it.

davidkra230 avatar Dec 19 '22 15:12 davidkra230

oh wait you were talking about obeying timezone offsets, yeah os.time is always the same on all servers and tick is client specific

iArxic avatar Dec 19 '22 17:12 iArxic