Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to check code execution time in visual studio c++

#include<bits/stdc++.h>
using namespace std;
using namespace std::chrono;
int main(){
auto start = high_resolution_clock::now();
  .....
	......
//time function
cout << "
";
auto stop = high_resolution_clock::now();
auto duration = duration_cast<microseconds>(stop - start);
cout << "Time taken by function: " << duration.count() << " microseconds" << "
";

  
  
  return 0;
}
 
PREVIOUS NEXT
Tagged: #check #code #execution #time #visual #studio
ADD COMMENT
Topic
Name
8+3 =