The stopwatch to continue counting even when the screen is closed?

A post was split to a new topic: Yet another homework assignment