• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <chrono>
2 #include <cstdio>
3 
4 #include "hanoi.h"
5 
6 using namespace std;
7 using namespace std::chrono;
8 
hanoi_callback(int from,int to)9 void hanoi_callback(int from, int to) {
10 }
11 
main()12 int main()
13 {
14   high_resolution_clock::time_point start = high_resolution_clock::now();
15   hanoi(0, 2, 1, 25, &hanoi_callback);
16   high_resolution_clock::time_point end = high_resolution_clock::now();
17 
18   printf("Duration: %lld ns\n",
19     static_cast<long long>(duration_cast<nanoseconds>(end - start).count()));
20 
21   return 0;
22 }
23