mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 09:18:31 +00:00
Add GetTime to redbean Lua (#255)
This commit is contained in:
parent
c506584174
commit
2730c66f4a
2 changed files with 10 additions and 1 deletions
|
@ -4846,6 +4846,11 @@ static int LuaSleep(lua_State *L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int LuaGetTime(lua_State *L) {
|
||||
lua_pushnumber(L, nowl());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int LuaIsHiddenPath(lua_State *L) {
|
||||
size_t n;
|
||||
const char *s;
|
||||
|
@ -5201,6 +5206,7 @@ static const luaL_Reg kLuaFuncs[] = {
|
|||
{"GetRemoteAddr", LuaGetRemoteAddr}, //
|
||||
{"GetScheme", LuaGetScheme}, //
|
||||
{"GetServerAddr", LuaGetServerAddr}, //
|
||||
{"GetTime", LuaGetTime}, //
|
||||
{"GetUrl", LuaGetUrl}, //
|
||||
{"GetUser", LuaGetUser}, //
|
||||
{"GetZipPaths", LuaGetZipPaths}, //
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue