Writing an essay
I had an essay due for one of my classes.
I spent the last couple of hours before sleep writing.
I fell asleep while writing the essay.
I woke up and quickly finished the paper.
I brought the essay into class last minute and passed.