We currently have the ability to get what time the datastore was updated but no ability to get the current time (with accuracy)
using os.time() * 1000 - info.UpdatedTime
is not a option considering that the os.time() is not the exact same for all servers and is not in sync with info.UpdatedTime
so my feature request is that we add a GetTime
property to DataStoreKeyInfo
this will allow us to know how long we need to wait before its safe to set the datastore again
local value, info = dataStore:GetAsync("Key")
local timeSinceUpdate = info.GetTime - info.UpdatedTime
if timeSinceUpdate < 6000 then
-- wait until 6 seconds have passed
end
-- its now safe to SetAsync without the request getting throttled