From 820b171245f2f14766f3accdb0246a4e2c0d596a Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Thu, 7 Dec 2023 17:54:04 +0100 Subject: Refactor --- source/saw/profiler.c | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 source/saw/profiler.c (limited to 'source/saw/profiler.c') diff --git a/source/saw/profiler.c b/source/saw/profiler.c deleted file mode 100644 index 2f8e23b..0000000 --- a/source/saw/profiler.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "../kit/time.h" -#include "../kit/types.h" - -#include - -i64 profiler_time_; - -#ifdef __GNUC__ -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wunused-function" -# pragma GCC diagnostic ignored "-Wunknown-pragmas" -# pragma GCC push_options -# pragma GCC optimize("O3") -#endif - -void profile_frame(char const *s) { - struct timespec ts; - timespec_get(&ts, TIME_UTC); - i64 t = ((i64) ts.tv_sec) * 1000 + ((i64) ts.tv_nsec) / 1000000; - if (profiler_time_ == 0) - printf("%s\n", s); - else - printf("%-19s+%lld\n", s, t - profiler_time_); - profiler_time_ = t; -} - -#ifdef __GNUC__ -# pragma GCC pop_options -# pragma GCC diagnostic pop -#endif -- cgit v1.2.3