C# tidur
using System.Threading;
static void Main()
{
//do stuff
Thread.Sleep(5000) //will sleep for 5 sec
}
Binary Killer
using System.Threading;
static void Main()
{
//do stuff
Thread.Sleep(5000) //will sleep for 5 sec
}
import java.util.concurrent.TimeUnit
TimeUnit.SECONDS.sleep(1);
or
TimeUnit.MINUTES.sleep(1);
import java.util.concurrent.TimeUnit
try {
TimeUnit.SECONDS.sleep(1);
}
catch (Exception e) {
System.out.println("Oops! Something went wrong!")
}
Thread.sleep(2000);
TimeUnit.SECONDS.sleep(1);
Thread.sleep(5000);