Add timestamp type and method
Factor clock code into a module