diff options
Diffstat (limited to '')
-rw-r--r-- | src/fallTest/Timer.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/fallTest/Timer.java b/src/fallTest/Timer.java index 2ad7efe..d8fd2e3 100644 --- a/src/fallTest/Timer.java +++ b/src/fallTest/Timer.java @@ -8,8 +8,13 @@ package fallTest; public class Timer { private long timeStart = System.currentTimeMillis(); - - public int time() { - return (int)(System.currentTimeMillis()-timeStart); + private int bpm; + + public Timer(int newBpm) { + bpm = newBpm; + } + + public double time() { + return ((double)(System.currentTimeMillis()-timeStart))*(bpm/60000.0); } } |