From 4f2de27b7abff2245839323ef2a820d103453594 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sun, 25 Oct 2020 09:34:57 +0900 Subject: [PATCH] temporary --- main.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/main.cc b/main.cc index 069d4bcc..64f1327e 100644 --- a/main.cc +++ b/main.cc @@ -183,6 +183,22 @@ static void unlink_async(tbb::task_group &tg, StringRef path) { tg.run([=]() { close(fd); }); } +class Timer { +public: + Timer(StringRef name) : timer(name, name) { + timer.startTimer(); + } + + Timer(StringRef name, llvm::TimerGroup &tg) : timer(name, name, tg) { + timer.startTimer(); + } + + ~Timer() { timer.stopTimer(); } + +private: + llvm::Timer timer; +}; + int main(int argc, char **argv) { // tbb::task_scheduler_init init(1); tbb::task_group tg;