📜  c# delay - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:06.480000             🧑  作者: Mango

代码示例2
// Thread Sleep vs Task Delay
int delayInSec = 3;

// Using Thread Sleep
Thread.Sleep(delayInSec * 1000);

// Using Task Delay
Task.Delay(delayInSec * 1000).Wait();