From 1a35e137b9dbe724268e50c67f05b0b45e8262b6 Mon Sep 17 00:00:00 2001 From: fasiondog Date: Fri, 29 Mar 2024 03:02:24 +0800 Subject: [PATCH] =?UTF-8?q?SpendTimer=20=E6=94=B9=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E5=88=B0=20std::cout=20=EF=BC=8C=E4=BB=A5=E4=BE=BF=20jupyter?= =?UTF-8?q?=20=E5=8F=AF=E4=BB=A5=E6=8D=95=E8=8E=B7=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hikyuu_cpp/hikyuu/utilities/SpendTimer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hikyuu_cpp/hikyuu/utilities/SpendTimer.cpp b/hikyuu_cpp/hikyuu/utilities/SpendTimer.cpp index e638c1bb..1596a5cd 100644 --- a/hikyuu_cpp/hikyuu/utilities/SpendTimer.cpp +++ b/hikyuu_cpp/hikyuu/utilities/SpendTimer.cpp @@ -66,7 +66,10 @@ SpendTimer::~SpendTimer() { #endif #else - printf("%5zu keep: %7.3f %s - %s\n", i, duration, unit.c_str(), m_keep_desc[i].c_str()); + // printf("%5zu keep: %7.3f %s - %s\n", i, duration, unit.c_str(), + // m_keep_desc[i].c_str()); + std::cout << std::setw(5) << " keep: " << i << std::setw(7) << std::setprecision(3) + << duration << " " << unit << " - " << m_keep_desc[i] << std::endl; #endif /* __ANDROID__ */ } } @@ -113,7 +116,8 @@ void SpendTimer::show() const { #endif #else - printf("%s", outmsg); + // printf("%s", outmsg); + std::cout << outmsg; #endif /* __ANDROID__ */ }