Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
namespace NilzorLib.Metro.Core
public class DelayedExecuter
DispatcherTimer _timer;
public static void ExecuteAfter(int ms, Action action)
ExecuteAfter(new TimeSpan(0,0,0,0,ms), action);
public static void ExecuteAfter(TimeSpan span, Action action)
var p = new DelayedExecuter();
p._timer = new DispatcherTimer();
p._timer.Interval = span;
p._timer.Tick += (a,b) =>
p._timer = null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment