| 30 | } |
| 31 | |
| 32 | void plot () { |
| 33 | stop(); |
| 34 | float total_time = 0; |
| 35 | for (int32_t i=0; i<desc.size(); i++) { |
| 36 | float curr_time = getTimeDifferenceMilliseconds(time[i],time[i+1]); |
| 37 | total_time += curr_time; |
| 38 | std::cout.width(30); |
| 39 | std::cout << desc[i] << " "; |
| 40 | std::cout << std::fixed << std::setprecision(1) << std::setw(6); |
| 41 | std::cout << curr_time; |
| 42 | std::cout << " ms" << std::endl; |
| 43 | } |
| 44 | std::cout << "========================================" << std::endl; |
| 45 | std::cout << " Total time "; |
| 46 | std::cout << std::fixed << std::setprecision(1) << std::setw(6); |
| 47 | std::cout << total_time; |
| 48 | std::cout << " ms" << std::endl << std::endl; |
| 49 | } |
| 50 | |
| 51 | void reset () { |
| 52 | desc.clear(); |