I am trying to create a function that takes in an Action and a Timeout, and executes the Action after the Timeout. The function is to be non-blocking. The function must be
Use Microsoft's Reactive Framework (NuGet "System.Reactive") and then you can do this:
protected void Execute(Action action, int timeout_ms) { Scheduler.Default.Schedule(TimeSpan.FromMilliseconds(timeout_ms), action); }