It was necessary to count all the stitches in that work, and I resolved to go on with it until I couldn't keep my eyes open, and then to go to bed.

It was necessary to count all the stitches, and I resolved to go on with it until I couldn't keep my eyes open, and then to go to bed.
