Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import java.util.Scanner
|
||||
|
||||
object Sleeper extends Application {
|
||||
val input = new Scanner(System.in)
|
||||
val ms = input.nextInt
|
||||
System.out.println("Sleeping...")
|
||||
Thread.sleep(ms)
|
||||
System.out.println("Awake!")
|
||||
object Sleeper extends App {
|
||||
print("Enter sleep time in milli sec: ")
|
||||
val ms = scala.io.StdIn.readInt()
|
||||
println("Sleeping...")
|
||||
val sleepStarted = scala.compat.Platform.currentTime
|
||||
Thread.sleep(ms)
|
||||
println(s"Awaked after [${scala.compat.Platform.currentTime - sleepStarted} ms]1")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue