I'm making a program with a global mouse and keyboard hook. The program will record the user's input when they press a record button and will stop recording once they press a stop button. I'm getting the timespan of each event by using a stopwatch, as that seems to be the most accurate method.
Here's a small snippet of the events a user's recording:
01:45:20 - Time: 00:00:03.7028259 - Mousemove
01:45:20 - Time: 00:00:03.7190386 - Mouseleftdown
01:45:20 - Time: 00:00:03.7363274 - Mousemove
01:45:20 - Time: 00:00:03.7431332 - Mousemove
01:45:20 - Time: 00:00:03.7519057 - Mousemove
01:45:20 - Time: 00:00:03.7594302 - Mouseleftup
Raise the timer resolution to 1ms (which is max). Then use any timing method you like (timers, sleep, events, ...) to obtain 1ms accuracy. 1000Hz should be enough for anything aimed at human perception.