naev 0.11.5
nlua_time.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7#include "ntime.h"
8
9#define TIME_METATABLE "time"
11/*
12 * Library stuff.
13 */
14int nlua_loadTime( nlua_env env );
15
16/*
17 * Time operations.
18 */
19ntime_t* lua_totime( lua_State *L, int ind );
20ntime_t* luaL_checktime( lua_State *L, int ind );
21ntime_t* lua_pushtime( lua_State *L, ntime_t time );
22ntime_t luaL_validtime( lua_State *L, int ind );
23int lua_istime( lua_State *L, int ind );
ntime_t * luaL_checktime(lua_State *L, int ind)
Gets time at index raising an error if isn't a time.
Definition nlua_time.c:101
ntime_t * lua_pushtime(lua_State *L, ntime_t time)
Pushes a time on the stack.
Definition nlua_time.c:126
int nlua_loadTime(nlua_env env)
Loads the Time Lua library.
Definition nlua_time.c:60
int lua_istime(lua_State *L, int ind)
Checks to see if ind is a time.
Definition nlua_time.c:141
ntime_t luaL_validtime(lua_State *L, int ind)
Gets a time directly.
Definition nlua_time.c:115
ntime_t * lua_totime(lua_State *L, int ind)
Bindings for interacting with the time.
Definition nlua_time.c:90