If you run your program using the "time" program, it will display the time it took for the program to run. For example:
[machine:~]:time ls -al >> /dev/null
My question is where to write the code?
under the program itself or in the bash command line?
and my program is under C not C++...