diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 0b153ee1..56c2136a 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -11026,7 +11026,11 @@ int main(int argc, char** argv) { const bool trace = std::getenv("STRATA_TRACE") != nullptr; auto tr = [&](const char* what, long long a = -1, long long b = -1) { if (!trace) return; - std::fprintf(stderr, "strata trace: %s %lld %lld\n", what, a, b); + static thread_local Clock::time_point t0; + static thread_local bool t0_set = false; + if (!t0_set) { t0 = Clock::now(); t0_set = true; } + const double ms = std::chrono::duration(Clock::now() - t0).count(); + std::fprintf(stderr, "strata trace: %s %lld %lld %.1f ms\n", what, a, b, ms); std::fflush(stderr); }; {