public static void Main(string[] args) { Loop.Default.Run(async () => { var t = new UVTimer(); var now = DateTime.Now; await t.StartAsync(TimeSpan.FromSeconds(1)); Console.WriteLine(DateTime.Now - now); }); }
public static void Main(string[] args) { Loop.Default.Run(async () => { var t = new UVTimer(); var stopwatch = Stopwatch.StartNew(); await t.StartAsync(TimeSpan.FromSeconds(1)); stopwatch.Stop(); Console.WriteLine(stopwatch.Elapsed); }); }