问题
I could not find the Timer when developing a Windows Store App in c#. What is the alternative /new name/way of use of it?
回答1:
Different timers for different needs. Roughly...
DispatcherTimer - When you want work to be executed on the UI thread.
ThreadPoolTimer - When you want work to be executed on a background thread.
回答2:
DispatcherTimer is what you are looking for
var timer = new DispatcherTimer();
timer.Tick += DispatcherTimerEventHandler;
timer.Interval = new TimeSpan(0,0,0,1);
timer.Start();
来源:https://stackoverflow.com/questions/13772955/where-is-timer-in-a-windows-store-app