The first line will divide the whole big number by 60 (as in seconds per minute) and keep the remainder. That’s what the modulo operator does - it gives you the remainder of a division (ie. the decimal points).
The second line will simply get the seconds converted to minutes (straight up division by 60).
The third line gets the hours - 60 minutes in every hour.
The fourth and fifth line make sure that minutes never surpass 59 and that hours don’t go beyond 23.
This all means that your clock will effectively reset to 0 after 24 hours, but I’m guessing that’s not a huge problem? The TimeSpan object, as mentioned, will definitely make your life easier when doing these sorts of things - and doesn’t have any logical issues or limitations like my code above
As for the .ToString(“D2”) process, that’s just a habit really. From reading this thread, you are probably better off using .ToString(“00”) - which takes ints and floats without any fuss.
In regards to how you implement it in your code, that’s kind of up to you. Give it a try and ask again if you’re having any specific issues