예제 #1
0
        public LuaArgs setTime(LuaArgs args)
        {
            var dateNow    = OSAPI.TimeFromDate(DateTime.UtcNow);
            var dateTarget = args.GetDouble(0);

            m_timeOffset = dateTarget - dateNow;
            return(LuaArgs.Empty);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 public LuaArgs getTime(LuaArgs args)
 {
     return(new LuaArgs(OSAPI.TimeFromDate(Time)));
 }