From 4d127e824ab0459b41aa6e3c1d442aa1e9dc2880 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 24 Aug 2021 00:34:35 +0200 Subject: [PATCH] rulegen:: tests:: use clock() --- devmods/rulegen-tests.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/devmods/rulegen-tests.cpp b/devmods/rulegen-tests.cpp index c3d4fd41..70c8cb0b 100644 --- a/devmods/rulegen-tests.cpp +++ b/devmods/rulegen-tests.cpp @@ -562,7 +562,7 @@ void test_current(string tesname) { } int tstart = SDL_GetTicks(); - auto begin = std::chrono::high_resolution_clock::now(); + auto begin = clock(); // std::chrono::high_resolution_clock::now(); try { generate_rules(); status = "ACC"; @@ -590,7 +590,7 @@ void test_current(string tesname) { message = e.what(); } - auto end = std::chrono::high_resolution_clock::now(); + auto end = clock(); // std::chrono::high_resolution_clock::now(); if(t_origin.size() && (draw_which & 2)) { restart_game_on(new hrmap_testproto); @@ -652,7 +652,8 @@ void test_current(string tesname) { case 'C': Out("code", qcode); case 't': Out("try", try_count); case 'T': Out("T", tstart / 1000.); - case 'P': Out("Tp", std::chrono::duration_cast(end-begin).count() / 1000000000.); +// case 'P': Out("Tp", std::chrono::duration_cast(end-begin).count() / 1000000000.); + case 'P': Out("Tp", (end-begin) * 1. / CLOCKS_PER_SEC); case 'y': Out("tree", isize(treestates)); case 'a': Out("amin;amax", lalign(0, areas[0], ";", areas.back())); case 'h': Out("shapes", isize(arb::current.shapes));