mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fixed highlighting of the searched option
+ Create controls only on the shown and active tab + Line class : deleted unused sizer + In GUI_Utils added TaskTimer class for the print a time of some task duration + BedShapeDialog:: activated options_groups + commented some unused code
This commit is contained in:
parent
52e6050698
commit
8fb3a44a4e
10 changed files with 186 additions and 106 deletions
|
@ -18,6 +18,8 @@
|
|||
#include <wx/debug.h>
|
||||
#include <wx/settings.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "Event.hpp"
|
||||
|
||||
class wxCheckBox;
|
||||
|
@ -396,6 +398,32 @@ inline int hex_digit_to_int(const char c)
|
|||
}
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
|
||||
class TaskTimer
|
||||
{
|
||||
std::chrono::milliseconds start_timer;
|
||||
std::string task_name;
|
||||
public:
|
||||
TaskTimer(std::string task_name):
|
||||
task_name(task_name.empty() ? "task" : task_name)
|
||||
{
|
||||
start_timer = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::system_clock::now().time_since_epoch());
|
||||
}
|
||||
|
||||
~TaskTimer()
|
||||
{
|
||||
std::chrono::milliseconds stop_timer = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::system_clock::now().time_since_epoch());
|
||||
auto process_duration = std::chrono::milliseconds(stop_timer - start_timer).count();
|
||||
std::string out = (boost::format("\n!!! %1% duration = %2% ms \n\n") % task_name % process_duration).str();
|
||||
printf(out.c_str());
|
||||
#ifdef __WXMSW__
|
||||
std::wstring stemp = std::wstring(out.begin(), out.end());
|
||||
OutputDebugString(stemp.c_str());
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue