Performs the specified action at the specified interval in minutes.
using System;
using Windows.UI.Xaml;
public static void StartTimer(int intervalInMinutes, Action action)
{
var timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, intervalInMinutes, 0);
timer.Tick += (s, e) => action();
timer.Start();
}StartTimer(5, () =>
{
// Do something every five minutes.
});DispatcherTimer class
Lambda expressions (anonymous methods using the "=>" syntax)
The TrafficApp sample uses this method to update location travel info and freshness timestamps.