fixes #69 make sleep time a function of compact time