GetTickCount
Overview
The GetTickCount() function returns the number of milliseconds that have elapsed since the system started.
Signature
uint GetTickCount();
Return Value
uintConstraints and Notes
Example
#define MAX_SIZE 40void OnStart()
{
uint start = GetTickCount();
long fib = 0;
for(int i = 0; i < MAX_SIZE; i++) fib = TestFibo(i);
uint time = GetTickCount() - start;
PrintFormat("Calculating %d first Fibonacci numbers took %d ms", MAX_SIZE, time);
return;
}
long TestFibo(long n)
{
if(n < 2) return(1);
return(TestFibo(n - 2) + TestFibo(n - 1));
}
See Also
Previous
arrow_back
Getpointer