Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- std::chrono::time_point<std::chrono::system_clock> start, end;
- start = std::chrono::system_clock::now();
- for (int i =0; i < 5000; i ++)
- {
- for (int y = 0; y < size; y++)
- {
- for( int x = 0; x <size ; x++)
- {
- twoArray[y *size + x] += x;
- }
- }
- }
- end = std::chrono::system_clock::now();
- std::chrono::duration<double> elapsed_seconds = end - start;
- std::cout << "Elapsed Time " << elapsed_seconds.count() << "s\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement