Hello,
I hope this is the correct forum. (Java 8?)
Anyway, how would I start to implement this code with Java 8:
public static void main(String[] args) {
Wait wait = new Wait(10000); //wait for ten seconds
try
{
wait.StartWait(); //return immediately
Thread.sleep(11000);
wait.StopWait();
}
catch (Exception ex)
{
System.out.print("Timer timed out.");
}
System.out.print("Success!");
}
Again, I need to return immediately from the StartWait method.
Thank you.
williamj