Access to current real time

Things that we aren't going to implement
Tarrke
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Nov 07, 2018 1:20 pm
Contact:

Access to current real time

Post by Tarrke »

Hi,

there is in the LuaGameScript class an access to the write_file function of the os lua lib. Working on a mod that display timers I'm asked to add a current local time visualisation on the GUI. To answer this, after some lua digging, I found the os.clock() function (https://www.lua.org/pil/22.1.html) I can work with in lua, but here is no access to this function through the Factorio API.

Is it possible to make this function accessible through the Factorio API.

Thanks.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5304
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Access to current real time

Post by Klonan »

Tarrke wrote: Fri Nov 09, 2018 12:14 pm Is it possible to make this function accessible through the Factorio API.
Nope, sorry, it isn't deterministic, so would cause desyncs if used
Tarrke
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Nov 07, 2018 1:20 pm
Contact:

Re: Access to current real time

Post by Tarrke »

Klonan wrote: Fri Nov 09, 2018 12:15 pm Nope, sorry, it isn't deterministic, so would cause desyncs if used
Thanks for the quick answer.

Do you know any workaround for this maybe?
Post Reply

Return to “Won't implement”