Skip to content

Commit

Permalink
Added "ctr.time()", with millisecond precision
Browse files Browse the repository at this point in the history
  • Loading branch information
firew0lf committed Aug 19, 2015
1 parent 589d7a6 commit ebd3a68
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/ctr.c
@@ -1,3 +1,6 @@
#include <3ds/types.h>
#include <3ds/os.h>

#include <lua.h>
#include <lauxlib.h>

Expand All @@ -7,8 +10,15 @@ int load_news_lib(lua_State *L);
int load_ptm_lib(lua_State *L);
int load_hid_lib(lua_State *L);

static int ctr_time(lua_State *L) {
lua_pushinteger(L, osGetTime());

return 1;
}

// Functions
static const struct luaL_Reg ctr_lib[] = {
{ "time", ctr_time},
{ NULL, NULL }
};

Expand Down

0 comments on commit ebd3a68

Please sign in to comment.