diff options
author | Tyler Ferrari <tpoke.ferrari@gmail.com> | 2023-05-04 02:37:34 +0000 |
---|---|---|
committer | Tyler Ferrari <tpoke.ferrari@gmail.com> | 2023-05-04 02:37:34 +0000 |
commit | 291cf3bbfbd316f6acdb6d686470113ab91f53b6 (patch) | |
tree | 72ad28111d5c53e47dc5a825730bc88e6f7e638f /KeyDetection.java | |
parent | 6a10a65a0dbcd0540202479a02e4f91881791d6b (diff) | |
parent | a52f89a5092d347797cfd0893fc163233160e9e1 (diff) | |
download | NPEhero-291cf3bbfbd316f6acdb6d686470113ab91f53b6.tar.gz NPEhero-291cf3bbfbd316f6acdb6d686470113ab91f53b6.tar.bz2 NPEhero-291cf3bbfbd316f6acdb6d686470113ab91f53b6.zip |
Merge branch 'revert-6a10a65a' into 'main'
Revert "rearange some files"
See merge request guitarheros/guitarhero!2
Diffstat (limited to 'KeyDetection.java')
-rw-r--r-- | KeyDetection.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/KeyDetection.java b/KeyDetection.java new file mode 100644 index 0000000..98f96e4 --- /dev/null +++ b/KeyDetection.java @@ -0,0 +1,28 @@ +/*Name: + *Date: + *Period: + *Teacher: + *Description: + */ +package cs; + +import javax.swing.*; +import java.awt.event.ActionEvent; + +public class KeyDetection extends AbstractAction +{ + long timeStart = System.currentTimeMillis(); + private char key; + public KeyDetection(char ch){ + key = ch; + } + + public void actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + int time = (int)((System.currentTimeMillis()-timeStart)); + System.out.println(key + ": " + time); + + } + +} |