attempt to sleep for more accurate time period, minor cleanup
add missing return
add unit test
correct test params
add one extra test
add comment
more code cleanup
switch to uppercase constants
Merge pull request #365 from ryanlecompte/rate_limiter_timing_cleanup

Improve sleeping algorithm for rate limiting output streams