Example #1
0
        public void Dispose()
        {
            StowatchUpdate.Stop();
            StowatchUpdate = default;

            StowatchFrame.Stop();
            StowatchFrame = default;
        }
Example #2
0
        public void StopFrame()
        {
            StowatchFrame.Stop();
            Elapsed += StowatchFrame.Elapsed;
            FrameCount++;

            var updateElapsed = StowatchUpdate.Elapsed;

            if (updateElapsed >= UpdateRate)
            {
                FpsRender = FrameCount / Elapsed.TotalSeconds;
                FpsGlobal = FrameCount / updateElapsed.TotalSeconds;

                StowatchUpdate.Restart();
                Elapsed    = TimeSpan.Zero;
                FrameCount = 0;
            }
        }
Example #3
0
 public void StartFrame()
 {
     StowatchFrame.Restart();
 }