blob: d8fd2e3bcb73b3fd6e7921971ac8aa4b81cf7185 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*Name: Guitar Hero Project
*Description: Contains the method used to determine how long the user has been playing,
* used to determine when to send notes
*/
package fallTest;
public class Timer
{
private long timeStart = System.currentTimeMillis();
private int bpm;
public Timer(int newBpm) {
bpm = newBpm;
}
public double time() {
return ((double)(System.currentTimeMillis()-timeStart))*(bpm/60000.0);
}
}
|