I am currently trying to measure the time it takes from [the moment a flag is set programmatically in software before rendering some graphics] to [[the moment the graphic is actually displayed on the screen]].
Though I have some programming experience, my experience in electrical engineering and its surrounding knowledge is close to nil so please bear with me. I've been told oscilloscopes are often used to measure latencies, and I've seen some examples in which the latency from user input to screen displays were measured. From my limited research, these were usually done by attaching pressure sensors on the user input devices and photodiodes on the screens, and then measuring each with oscilloscope probes. In my case however my starting point of measure is from within software, and even with my limited knowledge I don't think sticking a probe in the computer is the right move. With that in mind, I'm wondering if something like, a USB-based Oscilloscope that comes with its own SDK could help me send something like an impulse from my program, so that I could compare the timing with probe-measured signals (i.e. photodiode)? Is this possible? Or are there better ways to achieve what I want?
I'm aware that general computer operating systems introduce various lags from system scheduling and background tasks etc., because general purpose systems are not built with precision in mind, and because of that my hypothetical software trigger will not be precise. But for my needs a reasonable millisecond-level measurement will suffice, and I believe I can tolerate several milliseconds of error. I'm also willing to take steps to minimize background service/tasks etc. to lower jitters caused by the OS doing what it does.
If you have better setups or ideas that you'd like to point me to, I'd be most grateful. Thanks in advance!