#!/usr/bin/env python3
# Desc: Pauses a random amount of time. Random distribution is inverse gaussian.
-# Version: 0.0.4
+# Version: 0.0.5
# Depends: python 3.7.3
-# Usage: ./sleepRand.py [-v] [-p L] SECONDS
+# Usage: ./sleepRand.py [-v] [-p P] SECONDS
# Input: SECONDS: float seconds (mean of inverse gaussian distribution)
-# L: precision (lambda of inverse gaussian distribution)
+# P: precision (lambda of inverse gaussian distribution)
# Example: python3 sleepRand.py -vv -p 8.0 60.0
import argparse;
# Define functions
def setup_logging(verbosity):
+ '''Sets up logging'''
# Depends: module: argparse
# Ref/Attrib: Haas, Florian; Configure logging with argparse; https://xahteiwi.eu/resources/hints-and-kinks/python-cli-logging-options/
base_loglevel = 30;
logging.debug('DEBUG:Debug logging output enabled.');
logging.debug('DEBUG:args.verbosity:' + str(args.verbosity));
logging.debug('DEBUG:args:' + str(args));
+
## Reject negative floats.
try:
### Get desired mean