paramerized show time and debug in global config

Also some additional time measurements in the qt app.
This commit is contained in:
jorenchik
2024-10-27 12:12:00 +02:00
parent 09a25d9216
commit 6359d97ba5
13 changed files with 97 additions and 44 deletions

View File

@@ -1,7 +1,16 @@
#pragma once
#include <chrono>
#include "result.h"
#include "parser.h"
Result<ParseInfo> transpile(std::string fileContent, bool isDebug);
Result<ParseInfo> transpile(std::string fileContent);
std::string escapeText(std::string text);
std::string wrapText(std::string text, size_t width);
extern std::chrono::high_resolution_clock::time_point start;
extern std::chrono::high_resolution_clock::time_point end;
std::string showTime(std::string label);

View File

@@ -1,4 +1,5 @@
#pragma once
extern bool debug;
extern bool showTimes;

View File

View File

@@ -77,6 +77,8 @@ QMainWindow *initMdemListWindow();
#define SETTING_HARD "hard"
#define SETTING_MEDIUM "medium"
#define SETTING_EASY "easy"
#define SETTING_DEBUG "debug"
#define SETTING_SHOW_TIMES "showTimes"
#define TEXT_LG = 20
#define ERROR_POOL_CHUNK 50

View File

@@ -3,7 +3,6 @@
#include <QMainWindow>
#include <qmainwindow.h>
#include "main.h"
#include "mdemList.h"
enum PracticeAlgorithm {