It’s caused by return value of function clock.
It returns a string: minute, second.
But the string %02d:%02d need to be format with number, not the string minute, second
Solutions:
Change the return value of clock to [minute, second].
Finally, it works. I remember having an error using parentheses, while the system expected using quotations. I changed it to square brackets, and it works perfectly.