Change sleep to use std::time::duration::Duration

This fixes a compile error.