GetTime

Category: System
Since engine version: 4.9.1.0 GWE

Description

Returns the time passed since operating system start. Can be used for exact time measurement.

Syntax

int GetTime ();

Remark

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.

Example

func TestCos()
{
	if(IsNetwork()) return(Log("TestCos funktioniert im Netzwerk nicht!"));
	var iStartTime = GetTime();
	for(var i = 0; i < 100; i++) var x = Cos(i, 100);
	var iTime = GetTime() - iStartTime;
	Log("Ein Cos-Aufruf benötigt: %d.%02d ms", iTime / 100, iTime % 100);
}
This function checks the performance of the function "Cos". To do this, it executes the function 100 times and calculates the processinf time using GetTime().
See also: GetSystemTime
Peter, August 2002