Why did the math student bring a ruler to bed

Riddle
Why did the math student bring a ruler to bed? 

    To measure how long he slept!