Hello @Theo Ekelmans ,
Sorry for the late reply.
Windows is not a real-time operating system, so guaranteeing sub-millisecond interrupt handling is extremely difficult. For more information, see Real-time operating system - Wikipedia.
This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as PUPs (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.
While technically, you can get high-resolution timestamps using System.Diagnostics.Stopwatch; however, the actual event detection latency will depend on the driver and the OS scheduler, which can easily delay several milliseconds.
Unless you have:
- A kernel driver optimized for real-time performance.
- External hardware that captures events and streams timestamps data to your application.
Without these, achieving reliable <1ms interrupt handling on Windows alone is unlikely.