Hi,
I have written a code that allows one to calculate the factorial of a number. Now I would like to see how long that my programme takes to calculate a specific number.
Is there a way to print out that time?
Thanks.
This is a discussion on Is there a way to print out the "time" which was used within the C++ Programming forums, part of the General Programming Boards category; Hi, I have written a code that allows one to calculate the factorial of a number. Now I would like ...
Hi,
I have written a code that allows one to calculate the factorial of a number. Now I would like to see how long that my programme takes to calculate a specific number.
Is there a way to print out that time?
Thanks.
Code:// ... MyTime.begin = getTime(); // ... do some back flips, maybe a swan dive MyTime.complete = getTime(); // TimeTaken = complete - begin std::cout<< TimeTaken<< std::endl; // ...
Last edited by QuestionKing; 01-25-2010 at 01:36 PM.
Asking a question you already know the answer to might teach you something you did not know...