コード例 #1
0
        public SleepCommand(long milliseconds, ActiveObjectEngine e, ICommand wakeupCommand)
        {
            sleepTime = milliseconds;

            engine = e;

            this.wakeupCommand = wakeupCommand;
        }
コード例 #2
0
        public static void Sample()
        {
            ICommand wakeup = new WakeupCommand();

            ActiveObjectEngine e = new ActiveObjectEngine();

            SleepCommand c = new SleepCommand(1000, e, wakeup);



            e.AddCommand(c);

            long start = DateTime.Now.Ticks / Pub.TicksPerMillisecond;

            e.Run();
        }