Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# Thread Sleep vs Task Delay

// Thread Sleep vs Task Delay
int delayInSec = 3;

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

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

PREVIOUS NEXT
Code Example
Csharp :: timer in c# 
Csharp :: unity 2d joystick controls 
Csharp :: c# round number 
Csharp :: c# odd even median 
Csharp :: button not working unity 
Csharp :: bootrap modal 
Csharp :: lat long data type c# 
Csharp :: how to cjeck if a string has a word c# 
Csharp :: ubuntu: how to open the terminal from c# 
Csharp :: c# random generator 
Csharp :: c# datetime to timestamp 
Csharp :: c# palidrone 
Csharp :: c# remove spaces from string 
Csharp :: c# loop through files in folder 
Csharp :: odd or even in c# 
Csharp :: replace double backslash with single backslash c# 
Csharp :: unity target frame rate 
Csharp :: how to change color of a sprite in unity 
Csharp :: unity 2d player move 
Csharp :: if unity 
Csharp :: how to make font c# 
Csharp :: key value pair in c# 
Csharp :: palindrome number c# 
Csharp :: make a list c# 
Csharp :: unity RemoveComponent 
Csharp :: run wpf application maximized 
Csharp :: add dependency injection .net core console app 
Csharp :: capitalize c# 
Csharp :: C# get md5 of file 
Csharp :: read all lines from txt c# 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =