Added a Clock abstraction.

This saves having to do this same math in a zillion places throughout
libraries.