Browse Source

Adding Tim the Timer.

master
Charles Reid 4 years ago
parent
commit
3fda35b902
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      lists/linked-lists/Tim.java

+ 21
- 0
lists/linked-lists/Tim.java View File

@@ -0,0 +1,21 @@
/**
* Tim the timer.
*
* "Hi Tim!"
* "How much Tim - "
*
* Tim tim = new Tim();
* do stuff
* tim.elapsed()
*/
class Tim {
double start, end;
public Tim() {
this.start = System.currentTimeMillis();
}
public double elapsed() {
this.end = System.currentTimeMillis();
return (end-start)/1000.0;
}
}


Loading…
Cancel
Save