“thread.sleep” Kode Jawaban

C# tidur

using System.Threading;

static void Main()
{
  //do stuff
  Thread.Sleep(5000) //will sleep for 5 sec
}
Binary Killer

Java tidur dalam kode

import java.util.concurrent.TimeUnit

TimeUnit.SECONDS.sleep(1);
or
TimeUnit.MINUTES.sleep(1);
Agreeable Angelfish

sleep () java

import java.util.concurrent.TimeUnit

try {
	TimeUnit.SECONDS.sleep(1);
}
catch (Exception e) {
	System.out.println("Oops! Something went wrong!")
}
Proud Puma

Java Thread Class Sleep

Thread.sleep(2000);
Brainy Bat

thread.sleep

TimeUnit.SECONDS.sleep(1);
Envious Eagle

Apa yang terjadi saat Anda menelepon thread.sleep ()

Thread.sleep(5000);
Arrogant Angelfish

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya