Self-powered Time-Keeping and Time-of-Occurrence Sensing