diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-12-07 17:54:04 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-12-07 17:54:04 +0100 |
commit | 820b171245f2f14766f3accdb0246a4e2c0d596a (patch) | |
tree | 9e2df3027dab99956371ea9ed86cd67ef81a9917 /source/saw/profiler.c | |
parent | aa5c9be52f2d41b8efb240ad96f808cf4f3e79c1 (diff) | |
download | saw-820b171245f2f14766f3accdb0246a4e2c0d596a.zip |
Refactor
Diffstat (limited to 'source/saw/profiler.c')
-rw-r--r-- | source/saw/profiler.c | 30 |
1 files changed, 0 insertions, 30 deletions
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 <stdio.h> - -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 |