Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public void keepTime(int hrs, int mins, int secs)
  2. {
  3. hrs = 0;
  4. mins = 0;
  5. secs = 0;
  6.  
  7. Timer t = new Timer();
  8.  
  9. for (secs=0 ; secs >61 ; secs++)
  10. if (secs >59)
  11. {
  12. mins++;
  13. secs =0;
  14. }
  15. else if (mins >59)
  16. {
  17. hrs++;
  18. mins = 0;
  19. }
  20. else if (hrs >23)
  21. hrs=0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement