#include #include static void BM_SDL_CreateDestroyWindow(benchmark::State& state) { if (!SDL_Init(SDL_INIT_VIDEO)) { state.SkipWithError(SDL_GetError()); return; } for (auto _ : state) { SDL_Window* win = SDL_CreateWindow( "bench", 640, 480, SDL_WINDOW_RESIZABLE ); if (!win) { state.SkipWithError(SDL_GetError()); break; } SDL_DestroyWindow(win); } SDL_Quit(); } BENCHMARK(BM_SDL_CreateDestroyWindow); BENCHMARK_MAIN();