How can I implement the execution of the stopwatch by a separate stream, in parallel with the execution of the main program?

Please provide a minimum reproducible example.

S. Nick2021-04-07 20:51:24

@ S.NICK Why? The person asked a specific question about the ways of implementation and does not ask for a ready-made code. The question is quite normal, the code of unsuccessful attempts will be completely superfluous here. Do not wrap up if you do not want newcomers to stop coming to the site at all.

Risto2021-04-07 21:15:21