pub fn time() -> u32
Get the current time, the number of ticks the game has been running.
Screeps documentation