ctime clock In C++, clock() is a function

ctime clock
In C++, clock() is a function from the <ctime> header that measures the CPU time used by a program. It returns the number of clock ticks elapsed since the program started.

Syntax:
cpp
Copy
Edit
clock_t clock();
Returns: The number of clock ticks since the program started.
To convert ticks into seconds, divide by CLOCKS_PER_SEC.