thank you for you help but it's not really what i'm looking for, i'm looking to find the differences in time from when a key is pressed until another key is pressed.
I think that's precisely what I outlined. System currentTimeInMillis gives you the current time (!) to millisecond precision. Getting the time between two events is as simple as saving the current time before and subtracting it from the current time after. The result is in milliseconds. If you have a playback routine, you can make it sleep the same number of milliseconds to reproduce your timing.
The kind of keyboard will make a lot of difference in how you get key down and key up events. Is it a standard computer? A MIDI controller? Something else? Are you able to capture these events and just display them as they happen? I know that's not part of the problem, but it's a step in figuring out a solution.
Look back through my earlier post and imagine what it would do if something as yet unknown called onKeyDown every time you hit a key. Look up the JavaDoc for anything that's not familiar. Except Note. I made that up.
If that doesn't help, keep asking! We might want to break this down into smaller problems so we don't get confused about what's needed and what's working.