diff options
Diffstat (limited to 'src/httpservice.cpp')
| -rw-r--r-- | src/httpservice.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/httpservice.cpp b/src/httpservice.cpp index 14cf60d..efcf17f 100644 --- a/src/httpservice.cpp +++ b/src/httpservice.cpp @@ -44,10 +44,14 @@ QHttpServerResponse HttpServer::GET_pixels() // std::shared_ptr<std::nullptr_t> logTime = std::make_shared<std::nullptr_t>(nullptr, [t]() { // qDebug() << "HttpServer::GET_pixels: elapsed" << t.nsecsElapsed() / 1000 << "(us)"; // }); - const std::shared_ptr<std::nullptr_t> logTime{nullptr, [t](auto unused_ptr) { - qDebug() << "HttpServer::GET_pixels: elapsed" - << t.nsecsElapsed() / 1000 << "(us)"; - }}; + static constexpr bool logTime{false}; + if constexpr (logTime) { + const std::shared_ptr<std::nullptr_t> + timeLogger{nullptr, [t](auto unused_ptr) { + qDebug() << "HttpServer::GET_pixels: elapsed" << t.nsecsElapsed() / 1000 + << "(us)"; + }}; + } Image img; { |
