Medir tiempo de ejecucion en c
Hola quisiera saber como se puede hacer para medir cuanto tarda un programa en ejecutarse programando en c
// program time.cpp
// written in borland c++, ver 4.5
#include <iostream.h>
#include <time.h>
const int N = 2000;
void main()
{
for(int i = 0;i < N;i++)
for(int j = 0;j < N;j++)
for(int k = 0;k < N;k++);
cout << clock()/CLK_TCK << endl;
cout << "end of program - good bye ! ! !" << endl;
} // MAIN
// written in borland c++, ver 4.5
#include <iostream.h>
#include <time.h>
const int N = 2000;
void main()
{
for(int i = 0;i < N;i++)
for(int j = 0;j < N;j++)
for(int k = 0;k < N;k++);
cout << clock()/CLK_TCK << endl;
cout << "end of program - good bye ! ! !" << endl;
} // MAIN
