Add realtime clock code and start on logging code