Exemple #1
0
        private static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                log.log.error(new System.Diagnostics.StackFrame(true), service.timerservice.Tick, "non input start argv");
                return;
            }

            center _center = new center(args);

            Int64 old_tick = 0;
            Int64 tick     = 0;

            while (true)
            {
                old_tick = tick;
                tick     = _center.poll();

                Int64 tmp = tick - old_tick;
                if (tmp < 50)
                {
                    System.Threading.Thread.Sleep(15);
                }
            }
        }
Exemple #2
0
        private static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                log.log.error(new System.Diagnostics.StackFrame(true), service.timerservice.Tick, "non input start argv");
                return;
            }

            center _center = new center(args);

            while (true)
            {
                var tmp = _center.poll();

                if (closeHandle.is_close)
                {
                    System.Threading.Thread.Sleep(100);
                    break;
                }

                if (tmp < 50)
                {
                    System.Threading.Thread.Sleep(15);
                }
            }
        }
Exemple #3
0
        private static void Main(string[] args)
        {
            if (args.Length <= 0)
            {
                System.Console.WriteLine("non input start argv");
                return;
            }

            center _center = new center(args);

            Int64 tick      = Environment.TickCount;
            Int64 tickcount = 0;

            while (true)
            {
                Int64 tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick    = tmptick + tickcount * UInt32.MaxValue;
                }
                tick = tmptick;

                _center.poll(tick);

                tmptick = (Environment.TickCount & UInt32.MaxValue);
                if (tmptick < tick)
                {
                    tickcount += 1;
                    tmptick    = tmptick + tickcount * UInt32.MaxValue;
                }
                Int64 ticktime = (tmptick - tick);
                tick = tmptick;

                if (ticktime < 50)
                {
                    Thread.Sleep(15);
                }
            }
        }