Example #1
0
        static public TimeScheduler GetTimeScheduler()
        {
            if (scheduler_ == null)
            {
                scheduler_ = new TimeScheduler();
            }

            return(scheduler_);
        }
Example #2
0
        private bool checkForNew = false;                        // Don't check for new on the first pass

        //private System.Timers.Timer aTimer;

        public QuakeDataSource(IQuakeDataSourceClient myInterface)
        {
            this.myInterface = myInterface;

            TimeScheduler.GetTimeScheduler().AddTask(this.GetType().FullName, TimeSpan.FromSeconds(1), () => OnTimedEvent());

            /*
             * aTimer = new System.Timers.Timer();
             * aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
             * aTimer.Interval = 1000;             // Fetch in a second on the first pass
             * aTimer.Enabled = true;
             */
        }