You can always use a smaller wait (either wait or Wait Until Next ms Multiple) in a loop so your VI does not lock up (no response from clicks), and count how long the vi is in idle. It should be acurate enough (within 30 seoncds out of 19 minutes).
If you use event in your VI, then simply wire 19 minutes to the "Time Out" input of the event structure. The VI only executes when either some monitored events happened or timed out. In your case, when it times out, just exit the loop. -Joe
