0

how many units is equal to a second of time?

i want to make a program that will print phrases per 2 or 3 seconds then after printing the last line will loop to the first line again. i'm thinking of using an if loop, and making and argument to make loop and repeat. tried making the phrases as objects, and i'm thinking of just calling it in the loop. this is just for my first code here in sololearn and i just want to use as much as i could of the things that i learnt. https://code.sololearn.com/c0neoPmPAQCD/?ref=app

20th Nov 2017, 4:53 AM
Tom Beng
Tom Beng - avatar
1 Answer
0
you can use Thread.sleep(2000); to make the program wait for 2 sec. Thread.sleep(2000) throws an exception so keep it under try and catch block.
20th Nov 2017, 10:36 AM
Devbrath
Devbrath - avatar