LuaBox
Loading...
Searching...
No Matches
ScriptMillis.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "lua_include.h"
4
#include "global.h"
5
6
static
unsigned
long
script_start_time = 0;
7
13
14
int
ScriptMillis
(lua_State* L_)
15
{
16
if
(script_start_time == 0) {
17
script_start_time = millis();
18
}
19
20
lua_pushinteger(L_, millis() - script_start_time);
21
return
1;
22
}
23
24
void
reset_script_time
()
25
{
26
script_start_time = millis();
27
}
ScriptMillis
int ScriptMillis(lua_State *L_)
Get the time in milliseconds since the script started running.
Definition
ScriptMillis.h:14
reset_script_time
void reset_script_time()
Definition
ScriptMillis.h:24
src
api
ScriptMillis.h
Generated by
1.14.0