using System.Diagnostics;
using System.Windows.Forms;

namespace Pilz.UI;

public static class HelpfulFunctions
{
    public static void Sleep(int milliseconds)
    {
        var stopw = new Stopwatch();

        stopw.Start();

        while (stopw.ElapsedMilliseconds < milliseconds)
            Application.DoEvents();

        stopw.Stop();
    }
}