示例#1
0
        protected void ProcessFrame()
        {
            if (exitCompleted)
            {
                return;
            }

            if (exitRequested)
            {
                PerformExit();
                exitCompleted = true;
                return;
            }

            Monitor.NewFrame();

            using (Monitor.BeginCollecting(PerformanceCollectionType.Scheduler))
                Scheduler.Update();

            using (Monitor.BeginCollecting(PerformanceCollectionType.Work))
                onNewFrame?.Invoke();

            using (Monitor.BeginCollecting(PerformanceCollectionType.Sleep))
                Clock.ProcessFrame();
        }
示例#2
0
        protected void ProcessFrame()
        {
            Monitor.NewFrame();

            using (Monitor.BeginCollecting(PerformanceCollectionType.Scheduler))
                Scheduler.Update();

            onNewFrame?.Invoke();

            using (Monitor.BeginCollecting(PerformanceCollectionType.Sleep))
                Clock.ProcessFrame();
        }