“thread.sleep” Code-Antworten

C# Schlaf

using System.Threading;

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

Java Schlaf im Code

import java.util.concurrent.TimeUnit

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

Schlaf () 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 -Klasse Schlaf

Thread.sleep(2000);
Brainy Bat

thread.sleep

TimeUnit.SECONDS.sleep(1);
Envious Eagle

Was passiert, wenn Sie Thread.sleep () aufrufen

Thread.sleep(5000);
Arrogant Angelfish

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen