public async Task TestStartAsync() { ITimer timer = new Utils.Timer.Timer(AverageTime.OneMinute); timer.OnTime += time => Console.WriteLine($"{DateTime.Now} {time}"); await timer.StartAsync(); await Task.Delay(5 * 60 * 1000); }
public async Task TestStopAsync() { ITimer timer = new Utils.Timer.Timer(AverageTime.OneMinute); await timer.StartAsync(); await Task.Delay(2000); await timer.StopAsync(); }