GetTickCount
From Liberty Unleashed Wiki
This function returns the uptime of the host in milliseconds. This function is useful for measuring times, especially small intervals. Note that for hosts which have been online more than 24 days, the tick count will return back to 0.
Syntax
int GetTickCount()
Arguments
- none
Example
This example tells the player how long the host pc has been on when they type '/hoston'
function onPlayerCommand( player, cmd, text ) { if ( cmd == "hoston" ) { MessagePlayer( "The host pc has been online for " + floor( GetTickCount() / 60000 ) + " minutes.", player ); } }
Notes
The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.
Related Functions
- GetDistance
- GetDistance2D
- GetFullTime
- GetTickCount
- GetTime
- GetTok
- InPoly
- IsIn
- IsNum
- NumTok
- RandomString