Add command duration into the sleep function

Needed to actually pass the time.