You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
519 B
26 lines
519 B
3 years ago
|
#ifndef YDWEGetGameTimeIncluded
|
||
|
#define YDWEGetGameTimeIncluded
|
||
|
|
||
|
library YDWEGetGameTime initializer YDWEGetGameTimeInit
|
||
|
|
||
|
globals
|
||
|
private timer t
|
||
|
endglobals
|
||
|
|
||
|
function YDWEGetGameTime takes nothing returns real
|
||
|
return TimerGetElapsed(t)
|
||
|
endfunction
|
||
|
|
||
|
function YDWEGetGameCurrentTime takes nothing returns integer
|
||
|
return R2I(TimerGetElapsed(t))
|
||
|
endfunction
|
||
|
|
||
|
function YDWEGetGameTimeInit takes nothing returns nothing
|
||
|
set t = CreateTimer()
|
||
|
call TimerStart(t, 1000000.0, false, null)
|
||
|
endfunction
|
||
|
|
||
|
endlibrary
|
||
|
|
||
|
#endif
|