CalendarNotepad/SharkingTest/Program.cs
2024-07-08 13:57:07 +08:00

24 lines
531 B
C#

// See https://aka.ms/new-console-template for more information
using CalendarNotepad.Extends;
Console.WriteLine("Hello, World!");
var showMsg = () => Console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss")} show message!");
var reMsg = () => $"{DateTime.Now.ToString("HH:mm:ss")} show message!";
var task = new Task<string>(reMsg);
var shaking = new Shaking(10);
//showMsg();
//await Task.Delay(5 * 1000);
//shaking.Run(showMsg);
shaking.Run(task);
shaking.Run(task);
Console.WriteLine(task.Result);
Console.ReadKey();