Data update
This commit is contained in:
parent
61b93a2cd1
commit
5af6d93694
858 changed files with 20572 additions and 2082 deletions
|
|
@ -1,29 +0,0 @@
|
|||
class Metronome{
|
||||
double bpm;
|
||||
int measure, counter;
|
||||
public Metronome(double bpm, int measure){
|
||||
this.bpm = bpm;
|
||||
this.measure = measure;
|
||||
}
|
||||
public void start(){
|
||||
while(true){
|
||||
try {
|
||||
Thread.sleep((long)(1000*(60.0/bpm)));
|
||||
}catch(InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
counter++;
|
||||
if (counter%measure==0){
|
||||
System.out.println("TICK");
|
||||
}else{
|
||||
System.out.println("TOCK");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public class test {
|
||||
public static void main(String[] args) {
|
||||
Metronome metronome1 = new Metronome(120,4);
|
||||
metronome1.start();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue