void AddInviteCD(uint uuid) { if (mInviteInfoCDs.ContainsKey(uuid) == false) { Utils.Timer timer = new Utils.Timer((int)mInviteInterval * 1000, false, mInviteInterval * 1000, (dt) => { if (dt <= 0f) { mInviteInfoCDs.Remove(uuid); } }); mInviteInfoCDs.Add(uuid, timer); } else { Utils.Timer timer = mInviteInfoCDs[uuid]; timer.Reset((int)mInviteInterval * 1000); } }
static int _m_Reset(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Utils.Timer __cl_gen_to_be_invoked = (Utils.Timer)translator.FastGetCSObj(L, 1); try { { float time = (float)LuaAPI.lua_tonumber(L, 2); __cl_gen_to_be_invoked.Reset(time); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }