how to get current timestamp?

Place to get help with not working mods / modding interface.
kevinma
Inserter
Inserter
Posts: 33
Joined: Tue Jan 08, 2019 4:07 pm
Contact:

how to get current timestamp?

Post by kevinma »

os.time() is not work since missing the os table.

on_tick event may help, but is there any other ways?
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: how to get current timestamp?

Post by DaveMcW »

game.tick

The only way to get real time is to host a server and have a script synchronize the time.
RabbitKiller
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Feb 13, 2019 1:27 am
Contact:

Re: how to get current timestamp?

Post by RabbitKiller »

There's a time spent mod but ain't seen a timestamp
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: how to get current timestamp?

Post by darkfrei »

The only one time is

Code: Select all

local tick = game.tick
Post Reply

Return to “Modding help”