#include <iostream>
#include <time.h> // нужно для clock()
using std::cout;
int main(void)
{
// начальное время
clock_t t1 = clock();
for(int i=0; i<1000000000; i++);
// время окончания
clock_t t2 = clock();
// время выполнения в секундах
cout << "Time: " << (double) (t2-t1) / (double)CLOCKS_PER_SEC << '\n';
std::cin.get();
return 0;
}
No comments:
Post a Comment