|
@@ -1,10 +1,9 @@
|
|
-#include "widget.h"
|
|
|
|
|
|
|
|
#include <QCoreApplication>
|
|
#include <QCoreApplication>
|
|
-#include "Logs/loginit.h"
|
|
|
|
|
|
+#include <thread>
|
|
|
|
+// #include "Logs/loginit.h"
|
|
#include "spdlog/spdlog.h"
|
|
#include "spdlog/spdlog.h"
|
|
-#include "Timer/TWTimer.hpp"
|
|
|
|
-
|
|
|
|
|
|
+#include "FmtLog/fmtlog.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -15,7 +14,7 @@ void printCPPTime()
|
|
while(true)
|
|
while(true)
|
|
{
|
|
{
|
|
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
|
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
|
- SPDLOG_INFO("C++风格的时间 间隔: {} us", std::chrono::duration_cast<std::chrono::microseconds>(now - lastTime).count());
|
|
|
|
|
|
+ // SPDLOG_INFO("C++风格的时间 间隔: {} us", std::chrono::duration_cast<std::chrono::microseconds>(now - lastTime).count());
|
|
lastTime = now;
|
|
lastTime = now;
|
|
count++;
|
|
count++;
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
|
@@ -29,7 +28,7 @@ void printCTime()
|
|
while(true)
|
|
while(true)
|
|
{
|
|
{
|
|
std::time_t now = std::time(nullptr);
|
|
std::time_t now = std::time(nullptr);
|
|
- SPDLOG_INFO("***** C风格的时间 间隔: {} us", std::difftime(now, lastTime));
|
|
|
|
|
|
+ // SPDLOG_INFO("***** C风格的时间 间隔: {} us", std::difftime(now, lastTime));
|
|
lastTime = now;
|
|
lastTime = now;
|
|
count++;
|
|
count++;
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
|
@@ -39,14 +38,15 @@ void printCTime()
|
|
int main(int argc, char *argv[])
|
|
int main(int argc, char *argv[])
|
|
{
|
|
{
|
|
QCoreApplication a(argc, argv);
|
|
QCoreApplication a(argc, argv);
|
|
- init_log();
|
|
|
|
|
|
+ FMTLOG_INFO("********** Time **********");
|
|
|
|
+ // init_log();
|
|
|
|
|
|
SPDLOG_INFO("********** Time **********");
|
|
SPDLOG_INFO("********** Time **********");
|
|
|
|
|
|
// CPPTP.add_task(printCPPTime);
|
|
// CPPTP.add_task(printCPPTime);
|
|
// CPPTP.add_task(printCTime);
|
|
// CPPTP.add_task(printCTime);
|
|
auto now = std::time(nullptr);
|
|
auto now = std::time(nullptr);
|
|
- SPDLOG_INFO("{}", std::ctime(&now));
|
|
|
|
|
|
+ // SPDLOG_INFO("{}", std::ctime(&now));
|
|
|
|
|
|
|
|
|
|
return a.exec();
|
|
return a.exec();
|