示例#1
0
        private void setTimeout(SpammedCommand command, TickDelay tickLength)
        {
            //Server.Current.Log(string.Format("command timeout: {0}", command.Context.CommandName));
            var t = new System.Timers.Timer()
            {
                Interval  = (long)tickLength,
                AutoReset = false,
            };

            t.Elapsed += (sender, e) => nextCommand(sender, e, command);
            t.Start();
        }
示例#2
0
 private void nextCommand(object sender, System.Timers.ElapsedEventArgs e, SpammedCommand command)
 {
     //Server.Current.Log(string.Format("nextCommand: {0}", command.Context.CommandName));
     ready = true;
     TryExecuteCommand(command.Context, command.Info);
 }