Re: [Dev-C++] running time of algorithms
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Lorenzo <co...@in...> - 2001-09-27 08:05:22
|
The solution of Anton Tichawa is right, but you can use the standard
function "time" that is independent from the platform.
eg.
#include <time.h>
int main(int argc, char **argv)
{
time_t start, end;
start = time(0);
my_algorithm();
end = time(0);
// end - start is the number of seconds to run the my_algorithm();
}
----------------------------------------------------------------------------
---
If debugging is the process of removing bugs,
then programming must be the process of putting them in.
----------------------------------------------------------------------------
---
|