alternetsoft / AlternetUI

MIT License
22 stars 2 forks source link

Increase Timer resolution #109

Closed Shadowblitz16 closed 6 months ago

Shadowblitz16 commented 6 months ago

Currently timer can only be made to be as quick as 1 ms a sec This won't do for high resolution timing apps like games.

Consider making the Timer class accurate to System.TimeSpan.Ticks instead of Milliseconds.

generalloki commented 6 months ago

You can use System.Timers.Timer https://learn.microsoft.com/en-us/dotnet/api/system.timers.timer?view=net-8.0

but it's probably won't be a good idea to update control's properties in such timer event handler.