Implement time type

This is ready for review/merge, implements the basic time type.