# GetTime

System
5.1 OC
int
Returns the time passed since operating system start. Can be used for exact time measurement.
As operating system times will vary on different computers, this function will always return 0 in a network game or playback to avoid synchronization errors.
func TestCos() { if(IsNetwork()) return(Log("TestCos doesn't work in a network game!")); var start_time = GetTime(); for(var i = 0; i < 100; i++) Cos(i, 100); var time = GetTime() - start_time; Log("A call to Cos takes %d.%02d ms", time / 100, time % 100); }
This function checks the performance of the function "Cos". To do this, it executes the function 100 times and calculates the time the process took using GetTime().
Peter
2002-08