Exemple #1
0
int _gettimeofday (struct timeval * tp, void* zone)
{
    (void) zone;
    long long ts = tm_timestamp();
    tp->tv_sec = floor(ts / 1000000);
    tp->tv_usec = ts % 1000000;
    return 0;
}
Exemple #2
0
static int l_tm_timestamp (lua_State* L)
{
  lua_pushnumber(L, tm_timestamp());
  return 1;
}