Refactor to use a function.
Add stat arg.  Sleep after test1.