1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-08-15 22:31:40 +02:00

Add WindowsUtils.CreateSingleTickTimer

This commit is contained in:
2017-01-02 04:28:57 +01:00
parent edfa9264d5
commit 4ed30b3619

@@ -1,5 +1,6 @@
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
namespace TweetDck.Core.Utils{
static class WindowsUtils{
@@ -29,5 +30,14 @@ namespace TweetDck.Core.Utils{
return Process.Start(processInfo);
}
public static Timer CreateSingleTickTimer(int timeout){
Timer timer = new Timer{
Interval = timeout
};
timer.Tick += (sender, args) => timer.Stop();
return timer;
}
}
}