#!/usr/bin/env python3
# Desc: Pauses a random amount of time. Random distribution is inverse gaussian.
-# Version: 0.0.2
+# Version: 0.0.3
# Depends: python 3.7.3
# Usage: ./sleepRand.py arg1
# Input: arg1: float seconds (mean of inverse gaussian distribution)
import math, time, random, sys
+# Adjustments
+lambdaFactor = 4; # spread factor; inversely proportional to variance
+
# Define functions
def randInvGau(mu, lam):
"""Returns random variate of inverse gaussian distribution"""
arg1 = float(sys.argv[1]); # first argument
desMean = arg1;
-# Configure
-lambdaFactor = 4; # spread factor; inversely proportional to variance
-
# Calculate delay
delay = randInvGau(desMean, desMean * lambdaFactor);
#print('DEBUG:delay:' + str(float(delay)));