# How to Record Time in C++?

To record the time your program costs, you can use the function clock(), that is defined in <ctime>. Here is an example showing how to use this function: