Advertisement
ahmad_zizo

LAB 2

Nov 2nd, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class CodeTimer {
  2. long startTime;
  3. long endTime;
  4.  
  5. CodeTimer(){
  6. current_time = System.currentTimeMillis();
  7. }
  8. public float getStartTime(){
  9. return current_time;
  10. }
  11. public float getEndTime(){
  12. return current_time;
  13. }
  14. public float start(){
  15. startTime = getStartTime();
  16. }
  17. public float stop(){
  18. endTime = getEndTime();
  19. }
  20. public float getElapsedTime(){
  21. return start() - stop();
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement