* @brief stops the last timer started and outputs \a msg, if given. * @return elapsed time in seconds. **/
| 38 | * @return elapsed time in seconds. |
| 39 | **/ |
| 40 | double toc() { |
| 41 | assert(stimes.begin() != stimes.end()); |
| 42 | |
| 43 | std::chrono::system_clock::time_point endtime = std::chrono::high_resolution_clock::now(); |
| 44 | std::chrono::system_clock::time_point starttime = stimes.back(); |
| 45 | stimes.pop_back(); |
| 46 | |
| 47 | std::chrono::duration<double> elapsed_seconds = endtime - starttime; |
| 48 | |
| 49 | auto t = elapsed_seconds.count(); |
| 50 | std::cout << "Elapsed: " << t * 1000 << "ms" << std::endl; |
| 51 | return t; |
| 52 | } |
| 53 | }; |
| 54 | |
| 55 | class Segmentation { |