Do you have System.Threading.Thread package added to your project.json
?
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23811",
"System.Threading.Thread": "4.0.0-beta-23516"
},
"frameworks": {
"dnxcore50": { }
}
}
Then I can use Thread.Sleep
:
using System;
using System.Threading;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine(DateTime.Now);
Thread.Sleep(2000);
Console.WriteLine("Hello World!");
Console.WriteLine(DateTime.Now);
}
}
}
