aboutsummaryrefslogtreecommitdiff
path: root/src/base/time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/time.cc')
-rw-r--r--src/base/time.cc15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/base/time.cc b/src/base/time.cc
index 6c45efc21..01bf02de2 100644
--- a/src/base/time.cc
+++ b/src/base/time.cc
@@ -15,9 +15,7 @@
*/
#include "perfetto/base/time.h"
-
#include "perfetto/base/build_config.h"
-#include "perfetto/base/logging.h"
#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
#include <Windows.h>
@@ -35,8 +33,7 @@ TimeNanos GetWallTimeNs() {
::QueryPerformanceFrequency(&freq);
LARGE_INTEGER counter;
::QueryPerformanceCounter(&counter);
- double elapsed_nanoseconds = (1e9 * static_cast<double>(counter.QuadPart)) /
- static_cast<double>(freq.QuadPart);
+ double elapsed_nanoseconds = (1e9 * counter.QuadPart) / freq.QuadPart;
return TimeNanos(static_cast<uint64_t>(elapsed_nanoseconds));
}
@@ -68,15 +65,5 @@ void SleepMicroseconds(unsigned interval_us) {
#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
-std::string GetTimeFmt(const std::string& fmt) {
- time_t raw_time;
- time(&raw_time);
- struct tm* local_tm;
- local_tm = localtime(&raw_time);
- char buf[128];
- PERFETTO_CHECK(strftime(buf, 80, fmt.c_str(), local_tm) > 0);
- return buf;
-}
-
} // namespace base
} // namespace perfetto