3#ifndef __NUITKA_TRACING_H__
4#define __NUITKA_TRACING_H__
13#define NUITKA_PRINT_TRACE(value) \
18#define NUITKA_PRINTF_TRACE(...) \
20 printf(__VA_ARGS__); \
25#define NUITKA_PRINT_TRACE(value)
26#define NUITKA_PRINTF_TRACE(...)
30#if defined(_NUITKA_EXPERIMENTAL_SHOW_STARTUP_TIME)
35static void inline PRINT_TIME_STAMP(
void) {
38 printf(
"%02d:%02d:%02d.%03d:", t.wHour, t.wMinute, t.wSecond, t.wMilliseconds);
41static void inline PRINT_TIME_STAMP(
void) {
43 gettimeofday(&tv, NULL);
45 time_t now_time = tv.tv_sec;
46 struct tm *now_tm = localtime(&now_time);
49 strftime(tm_buf,
sizeof(tm_buf),
"%Y-%m-%d %H:%M:%S", now_tm);
50 printf(
"%s.%03ld ", tm_buf, tv.tv_usec / 1000);
54#define NUITKA_PRINT_TIMING(value) \
63#define NUITKA_PRINT_TIMING(value) NUITKA_PRINT_TRACE(value)