Advanced

Confusion on Time and API calls

Confusion on Time and API calls
June 12, 2021 02:56PM
Hello,

I recently had a script that was timing out. Another script used an os.date call to get the progression of time. To cache when to timeout.

Looking at the template for a new script, there is a call to PGC.GetCPUUsage() which seems a better choice to get the actually CPU usage as that can occur slower than the passage of time. However this call is not documented on https://project-gc.com/doxygen/lua-sandbox/classPGC__LUA__Sandbox.html

What is the current best practice for getting the passage of time to allow scripts to timeout?

Thanks
Sorry, you do not have permission to post/reply in this forum.