Real time clock to sample I-O states and store them in memory