def ParseOptions():
    'Parses the command line options.\n\n  In case of command line errors, it will show the usage and exit the\n  program.\n\n  @return: the options in a tuple\n\n  '
    parser = optparse.OptionParser()
    parser.add_option('-t', dest='thread_count', default=1, type='int', help='Number of threads', metavar='NUM')
    parser.add_option('-d', dest='duration', default=5, type='float', help='Duration', metavar='SECS')
    (opts, args) = parser.parse_args()
    if (opts.thread_count < 1):
        parser.error('Number of threads must be at least 1')
    return (opts, args)
Parses the command line options.

In case of command line errors, it will show the usage and exit the
program.

@return: the options in a tuple
def ParseOptions():
    'Parses the command line options.\n\n  In case of command line errors, it will show the usage and exit the\n  program.\n\n  @return: the options in a tuple\n\n  '
    parser = optparse.OptionParser()
    parser.add_option('-t', dest='thread_count', default=1, type='int', help='Number of threads', metavar='NUM')
    parser.add_option('-d', dest='duration', default=5, type='float', help='Duration', metavar='SECS')
    (opts, args) = parser.parse_args()
    if (opts.thread_count < 1):
        parser.error('Number of threads must be at least 1')
    return (opts, args)