diff options
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 |