3 ms·
yes, correct - my code is just the performance test, which IMHO is the first step and surprisingly tricky due to effects from the loop around it. The code for
by asah 7y ago
yes, correct - my code is just the performance test, which IMHO is the first step and surprisingly tricky due to effects from the loop around it.
The code for dynamic enable/disable is trivial but the design is a bit subjective. For example, another API might be set_dbg_output(bool) and then maybe get_dbg_output() to inspect the current state.
- pnako 7y agoAn alternative route might be to find a way to integrate this code with a logging library like spdlog. This way you'd get the cool short notation of dbg(...) and the ability to have more control about the sinks (including indeed dynamic disabling/enabling).