Changed the sleep function duration.

Now sleep actually sleeps for period instead of always '1'.
added notes that let the user know the period units are seconds.