-
Creating a Clock
Im working on this program and its a client server program and so when the client connects, I want a clock at the bottom of the window basically like this: 0:00:00, and for it to count how long Ive been connected and to keep counting until i have disconnected or exited the program. Ive checked the msdn website but it only has things for timers. I was wondering if someone could help. thanks!
-
Use time() to record the time when the application starts (this is t1)
Use time() whenever you are about to refresh the display (this is t2)
Use difftime() to work out the elapsed seconds between t1 and t2
Format to your personal taste
-
Do you have an example on how to actually code that. I dont understand how Id code that.