Timing events from MIDI files

Al's icon

I'm making a program where I want to be able to analyse a MIDI file and extract the timing of MIDI on notes. When I try and do this using a metro or clocker the timing always is a few ms out, is there a better way to do this?

Cheers,

Al.

Al's icon

When I say the timing of MIDI on notes I mean the time in ms since the start of the MIDI file.