Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Server implements Runnable{
- ...
- public void run(){
- long period = 45000L;
- long start = System.currentTimeMillis();
- while (System.currentTimeMillis() - start < period) {
- ...
- String input = readInput(); // - Execution gets "paused" since user is asked to enter input
- while (true){
- ...perform some other commands...
- }
- }
Add Comment
Please, Sign In to add comment