Think of it like a very fast version of a stopwatch as used for sports timing. When the shutter opens the watch starts timing, when it's closed it stops.

The only difference is most stopwatches work in hundredths of seconds whereas a shutter tester works in hundredths of milliseconds.