time.sleep() expects a float

Also handling case where python < 2.7 (datetime.timedelta.total_seconds is only available since Python >= 2.7)
Merge pull request #14 from loisaidasam/feature/fix_time_sleep

time.sleep() expects a float