C/C++ Get The Program Execution Time

When we crate a program, we can get time execution from our program to know how long our program running. This is a code how to get time execution from our program with C/C++. Create a main.c file and copy this code to that file.

Compile main.c with command :

gcc main.c -o timeexec

You can copy this code to your program to get time execution from your program.

2 thoughts on “C/C++ Get The Program Execution Time

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.