Timer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Timer

how can I make a function for timer!!

23rd Nov 2017, 6:42 AM
marzieh
marzieh - avatar
1 Answer
+ 5
If you only want seconds, you can use the fact that : time_t tps = time(0); ... time_t tps2 = time(0); //tps2 - tps is the time elapsed between both time calls
23rd Nov 2017, 8:07 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar