Verify that the given run mode and run time are valid. If the run mode is “interval”, the time boundary (in seconds) for the run time is returned if valid. Else, undef is returned because modes “clock” and “event” have no boundaries that need to be verified. In any case the sub will die if something is invalid, so the caller should eval their call. The eval error message is suitable for OptionParser::save_error().
Parameters
Required Arguments
run_mode | Name of run mode (e.g. “clock”, “event” or “interval”) |
run_time | Run time in seconds |
Returns
Time boundary in seconds if run mode and time are valid; dies if they are not. Time boundary is undef except for interval run mode.