Guest User

Untitled

a guest
May 24th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public boolean doLogin() {
  2. try {
  3. somemethodForLogin();
  4. return true;
  5. } catch (Exception e) {
  6. e.printStackTrace();
  7. return false;
  8. }
  9. }
  10.  
  11. new java.util.Timer().schedule(
  12. new java.util.TimerTask() {
  13. @Override
  14. public void run() {
  15. System.out.println("Returning after 8 seconds wait");
  16. }
  17. },
  18. 8000
  19. );
Add Comment
Please, Sign In to add comment