Thank you. Code can be viewed at https://github.com/timoheimonen/clocksimulator

Thanks! I was keen to find out how you prevented screen sleep and was interested to find out about wakeLock.