#include <iostream>
#include <time.h>
#include <stdio.h>
using std::cout;
using std::endl;
#define COUNT 100000000
int main()
{
cout << "Iteration counts = " << COUNT << endl;
clock_t before = clock();
for (int i = 0; i < COUNT; i++) {
asm volatile ("mul %ebx\n");
}
clock_t elapsed = clock() - before;
cout << (double)elapsed / CLOCKS_PER_SEC << " seconds spent" << endl;
cout << elapsed << " clock tick counts" << endl;
return 0;
}