Profile can live in core
This commit is contained in:
parent
3e6f7ab3e5
commit
7505fd0f37
|
@ -51,7 +51,7 @@
|
|||
#include <wx/log.h>
|
||||
|
||||
#ifdef PRINT_STATISTICS_3D_VIEWER
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <board.h>
|
||||
#include <reporter.h>
|
||||
#include <gl_context_mgr.h>
|
||||
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <bitmaps.h>
|
||||
#include <macros.h>
|
||||
#include <menus_helpers.h>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "convert_basic_shapes_to_polygon.h"
|
||||
#include <trigo.h>
|
||||
#include <project.h>
|
||||
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <fp_lib_table.h>
|
||||
#include <eda_3d_viewer_frame.h>
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include <eda_3d_viewer_frame.h>
|
||||
|
||||
#include <base_units.h>
|
||||
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
|
||||
/**
|
||||
* Perform an interpolation step to easy control the transparency based on the
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "3d_fastmath.h"
|
||||
#include "3d_math.h"
|
||||
#include "../common_ogl/ogl_utils.h"
|
||||
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <wx/log.h>
|
||||
|
||||
|
||||
|
|
|
@ -353,7 +353,6 @@ set( COMMON_SRCS
|
|||
footprint_info.cpp
|
||||
gbr_metadata.cpp
|
||||
gestfich.cpp
|
||||
getrunningmicrosecs.cpp
|
||||
gr_basic.cpp
|
||||
grid_tricks.cpp
|
||||
hotkey_store.cpp
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#include <database/database_connection.h>
|
||||
#include <database/database_cache.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
|
||||
const char* const traceDatabase = "KICAD_DATABASE";
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <pgm_base.h>
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
#include <wx/log.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
using namespace KIGFX;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <trace_helpers.h>
|
||||
|
||||
using namespace KIGFX;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <wx/log.h>
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
using namespace KIGFX;
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
#include <gal/opengl/utils.h>
|
||||
#include <gal/opengl/vertex_item.h>
|
||||
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <typeinfo>
|
||||
#include <confirm.h>
|
||||
#include <trace_helpers.h>
|
||||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <wx/log.h>
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include <geometry/geometry_utils.h>
|
||||
#include <core/thread_pool.h>
|
||||
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <trace_helpers.h>
|
||||
|
||||
#include <gl_utils.h>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <gal/painter.h>
|
||||
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
#include <wx/log.h>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <view/view.h>
|
||||
#include <view/wx_view_controls.h>
|
||||
#include <view/zoom_controller.h>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <future>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <common.h>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <erc.h>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <kiplatform/app.h>
|
||||
#include <lockfile.h>
|
||||
#include <pgm_base.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project_rescue.h>
|
||||
#include <dialog_HTML_reporter_base.h>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include <symbol_edit_frame.h>
|
||||
#include <symbol_viewer_frame.h>
|
||||
#include <pgm_base.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <python_scripting.h>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include <algorithm>
|
||||
|
||||
// TODO(JE) Debugging only
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include "sch_bus_entry.h"
|
||||
#include "sim/sim_model_ideal.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <env_paths.h>
|
||||
#include <pgm_base.h>
|
||||
#include <kiway.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <wx_filename.h>
|
||||
#include <sch_io_mgr.h>
|
||||
#include <sch_plugins/legacy/sch_legacy_plugin.h>
|
||||
|
|
|
@ -8,6 +8,7 @@ endif()
|
|||
add_library( core STATIC
|
||||
base64.cpp
|
||||
observable.cpp
|
||||
profile.cpp
|
||||
thread_pool.cpp
|
||||
version_compare.cpp
|
||||
wx_stl_compat.cpp
|
||||
|
@ -20,4 +21,6 @@ target_link_libraries( core PUBLIC
|
|||
target_include_directories( core PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
$<TARGET_PROPERTY:thread-pool,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR} # to get config.h
|
||||
)
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
|
@ -25,42 +24,41 @@
|
|||
|
||||
|
||||
#include <config.h>
|
||||
#include <common.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined( _WIN32 )
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
|
||||
unsigned GetRunningMicroSecs()
|
||||
{
|
||||
FILETIME now;
|
||||
FILETIME now;
|
||||
|
||||
GetSystemTimeAsFileTime( &now );
|
||||
unsigned long long t = (UINT64(now.dwHighDateTime) << 32) + now.dwLowDateTime;
|
||||
unsigned long long t = ( UINT64( now.dwHighDateTime ) << 32 ) + now.dwLowDateTime;
|
||||
t /= 10;
|
||||
|
||||
return unsigned( t );
|
||||
}
|
||||
|
||||
#elif defined(HAVE_CLOCK_GETTIME)
|
||||
#elif defined( HAVE_CLOCK_GETTIME )
|
||||
|
||||
#include <ctime>
|
||||
|
||||
unsigned GetRunningMicroSecs()
|
||||
{
|
||||
struct timespec now;
|
||||
struct timespec now;
|
||||
|
||||
clock_gettime( CLOCK_MONOTONIC, &now );
|
||||
|
||||
unsigned usecs = ((unsigned)now.tv_nsec)/1000 + ((unsigned)now.tv_sec) * 1000000;
|
||||
// unsigned msecs = (now.tv_nsec / (1000*1000)) + now.tv_sec * 1000;
|
||||
unsigned usecs = ( (unsigned) now.tv_nsec ) / 1000 + ( (unsigned) now.tv_sec ) * 1000000;
|
||||
// unsigned msecs = (now.tv_nsec / (1000*1000)) + now.tv_sec * 1000;
|
||||
|
||||
return usecs;
|
||||
}
|
||||
|
||||
|
||||
#elif defined(HAVE_GETTIMEOFDAY_FUNC)
|
||||
#elif defined( HAVE_GETTIMEOFDAY_FUNC )
|
||||
|
||||
#include <sys/time.h>
|
||||
unsigned GetRunningMicroSecs()
|
||||
|
@ -69,8 +67,7 @@ unsigned GetRunningMicroSecs()
|
|||
|
||||
gettimeofday( &tv, 0 );
|
||||
|
||||
return (tv.tv_sec * 1000000) + tv.tv_usec;
|
||||
return ( tv.tv_sec * 1000000 ) + tv.tv_usec;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
//#define BENCHMARK
|
||||
|
||||
#ifdef BENCHMARK
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include <wx/log.h>
|
||||
|
||||
#ifdef PROFILE
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
#ifdef PROFILE
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
#include <wx/crt.h>
|
||||
#include <wx/log.h>
|
||||
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
|
||||
#define OCC_VERSION_MIN 0x070500
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
#include <widgets/pcb_properties_panel.h>
|
||||
#include <widgets/wx_aui_utils.h>
|
||||
#include <kiplatform/app.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <view/wx_view_controls.h>
|
||||
#include <footprint_viewer_frame.h>
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <pcb_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <pcb_track.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <string_utils.h>
|
||||
#include <zone.h>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#ifdef PROFILE
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#endif
|
||||
|
||||
#include <ratsnest/ratsnest_data.h>
|
||||
|
|
|
@ -67,7 +67,7 @@ using namespace std::placeholders;
|
|||
#include <wx/event.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/log.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <math/vector2wx.h>
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "zone_filler_tool.h"
|
||||
#include "zone_filler.h"
|
||||
#include "teardrop/teardrop.h"
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
ZONE_FILLER_TOOL::ZONE_FILLER_TOOL() :
|
||||
PCB_TOOL_BASE( "pcbnew.ZoneFiller" ),
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <wx/popupwin.h>
|
||||
#include <wx/cmdline.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <settings/settings_manager.h>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <qa_utils/utility_registry.h>
|
||||
|
||||
#include <common.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <wx/cmdline.h>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <string>
|
||||
|
||||
#include <common.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <wx/cmdline.h>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <string>
|
||||
|
||||
#include <common.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <wx/cmdline.h>
|
||||
#include <wx/init.h>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <unordered_set>
|
||||
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
bool testEvalExpr( const std::string expr, LIBEVAL::VALUE expectedResult, bool expectError = false,
|
||||
BOARD_ITEM* itemA = nullptr, BOARD_ITEM* itemB = nullptr )
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <common.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <wx/cmdline.h>
|
||||
#include <wx/msgout.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <board.h>
|
||||
#include <core/ignore.h>
|
||||
#include <zone.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <confirm.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <pgm_base.h>
|
||||
#include <profile.h>
|
||||
#include <core/profile.h>
|
||||
#include <reporter.h>
|
||||
#include <trace_helpers.h>
|
||||
#include <view/view_overlay.h>
|
||||
|
|
Loading…
Reference in New Issue