public static void RepeatWithDelegate(ExecuteRepeatedlyPrintDelegate method, int seconds, int duration) { int start = 0; while (start<=duration) { method(); Thread.Sleep(seconds * 1000); start += seconds; } }
public static void RepeatWithDelegate(ExecuteRepeatedlyPrintDelegate method, int seconds, int duration) { int start = 0; while (start <= duration) { method(); Thread.Sleep(seconds * 1000); start += seconds; } }
public void RepeatWithDelegate(ExecuteRepeatedlyPrintDelegate method, int seconds, int duration) { int start = 0; while (start <= duration) { if (RaiseCustomEvent != null) { RaiseCustomEvent(this, e); } Thread.Sleep(seconds * 1000); start += seconds; } }