PDA

View Full Version : Getting exact time


Mucho
26th Mar 2005, 02:00 PM
Does someone know how to get server time (time in milliseconds) in Unreal script ?
I'm thinking about doing a native c++ function who return system time but maybe something already exist.

( For the moment I'm using an integer variable TimeElapsed in the Timer function, who have do be executed only every second. )

elmuerte
26th Mar 2005, 03:18 PM
Level.TimeSeconds gives the time in seconds since the game began, however, it's not safe. It's influenced by the Level.TimeDilation variable. In other words, it's the game time, not the real world time.

For the real world time you can use the following variables defined in LevelInfo:

var transient int Year; // Year.
var transient int Month; // Month.
var transient int Day; // Day of month.
var transient int DayOfWeek; // Day of week.
var transient int Hour; // Hour.
var transient int Minute; // Minute.
var transient int Second; // Second.
var transient int Millisecond; // Millisecond.

Mucho
27th Mar 2005, 01:44 PM
Thanks a lot, it's exactly what I was looking for. :)