コード例 #1
0
ファイル: syscalls.c プロジェクト: hlev/firmware
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;
}
コード例 #2
0
ファイル: lua_tm.c プロジェクト: lizhizhou/runtime
static int l_tm_timestamp (lua_State* L)
{
  lua_pushnumber(L, tm_timestamp());
  return 1;
}