Advertisement
andmalv

Funcion para esperar n segundos

Jul 24th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.15 KB | None | 0 0
  1. Función:
  2.  
  3. public static void sleep(int s) {
  4.     try {
  5.         Thread.sleep(s * 1000);
  6.     } catch (Exception e) {}
  7. }
  8.  
  9. Uso:
  10.  
  11. sleep(2); // Para que espere 2s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement