public LuaArgs setTime(LuaArgs args) { var dateNow = OSAPI.TimeFromDate(DateTime.UtcNow); var dateTarget = args.GetDouble(0); m_timeOffset = dateTarget - dateNow; return(LuaArgs.Empty); }
public LuaArgs getModifiedTime(LuaArgs args) { var path = Sanitize(args.GetString(0)); try { CheckConnected(); CheckFileExists(path); var date = Mount.GetModifiedTime(path); var seconds = OSAPI.TimeFromDate(date); return(new LuaArgs(seconds)); } catch (IOException e) { throw new LuaError(e.Message); } }
public LuaArgs getTime(LuaArgs args) { return(new LuaArgs(OSAPI.TimeFromDate(Time))); }