Sending an impulse to oscilloscope from software?
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

Hmm. If you're not willing to make this input-triggered, then either you have to stick a probe in the computer, or find or make a different output device to trigger the scope. Which will also incur a delay.
One low-tech possibility is to find the HDD LED and wire a probe to that. Set the flag in software and trigger a disk write. Cheap, low but unknown latency.
A second possibility is to use the audio output. The latency properties of these are fairly well documented, because they're important to musicians. This can be made predictable, so you could have a known, fixed 20ms latency. Put a &quot;chirp&quot; out and watch it on the scope.
Various other outputs exist - serial and parallel ports - but these are no longer directly connected to the bus and have an unpredictable latency. Same with things like the legacy PC joystick port (which was itself a latency-measuring device!).
The super deluxe option is to get one of the FPGAs which can represent itself in the PCI memory space. You can write to that memory space, which triggers a PCI transaction, and get close to microsecond accuracy.
The XY option is to GPS-sync your PC clock to as high a degree of accuracy as possible, then time against a GPS pulse-per-second output from a different GPS source.
Mind you, the &quot;beam&quot; matters; even in an LCD, the display is fundamentally serialised. You can tell which frame the output appears on, but even at 144Hz that's a whole 7ms per frame. So we shouldn't try to achieve sub-milisecond accuracy because it's meaningless.