Browse Source

Adding Tim the Timer.

master
Charles Reid 5 years ago
parent
commit
3fda35b902
  1. 21
      lists/linked-lists/Tim.java

21
lists/linked-lists/Tim.java

@ -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