Browse Source

Use `Stopwatch.GetTimestamp()` for tickCount.

pull/1715/head
Steven Kirk 8 years ago
committed by Jeremy Koritzinsky
parent
commit
c7c9b0a205
  1. 3
      src/Avalonia.Visuals/Rendering/DefaultRenderTimer.cs

3
src/Avalonia.Visuals/Rendering/DefaultRenderTimer.cs

@ -2,6 +2,7 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Avalonia.Platform;
@ -84,7 +85,7 @@ namespace Avalonia.Rendering
_runtime = AvaloniaLocator.Current.GetService<IRuntimePlatform>();
}
return _runtime.StartSystemTimer(TimeSpan.FromSeconds(1.0 / FramesPerSecond), () => tick(Environment.TickCount));
return _runtime.StartSystemTimer(TimeSpan.FromSeconds(1.0 / FramesPerSecond), () => tick(Stopwatch.GetTimestamp()));
}
/// <summary>

Loading…
Cancel
Save