New course! Every coder should learn Generative AI!
Try a free lesson0
Timer
how can I make a function for timer!!
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