diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 09:28:06 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 09:28:06 -0500 |
commit | 6006326ea9fa14c7865ca255241cb9ec9788b9cd (patch) | |
tree | 10f860a1c549f63d05e52dffd6c64649a818980c | |
parent | 4b869669cc2f7d47579cb179767cc56f299932c1 (diff) | |
download | horizon-6006326ea9fa14c7865ca255241cb9ec9788b9cd.tar.gz horizon-6006326ea9fa14c7865ca255241cb9ec9788b9cd.tar.bz2 horizon-6006326ea9fa14c7865ca255241cb9ec9788b9cd.tar.xz horizon-6006326ea9fa14c7865ca255241cb9ec9788b9cd.zip |
util: Add helpers for logging step start/end
-rw-r--r-- | util/output.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/util/output.hh b/util/output.hh index 18bbe90..259a599 100644 --- a/util/output.hh +++ b/util/output.hh @@ -55,6 +55,20 @@ inline void output_time() { std::cerr << std::setfill('0') << std::setw(3) << millis.count(); } +/*! Outputs that +step+ is beginning execution. */ +inline void output_step_start(std::string step) { + output_time(); + std::cerr << "\tstep-start\t"; + std::cerr << step << std::endl; +} + +/*! Outputs that +step+ is finishing execution. */ +inline void output_step_end(std::string step) { + output_time(); + std::cerr << "\tstep-end\t"; + std::cerr << step << std::endl; +} + /*! Outputs a message of the specified +type+ to the log stream. * @param type The type of message to output. * @param colour The colourisation of the message. |