Implement timer de/serialization.