mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 16:11:02 +08:00
Linux build
This commit is contained in:
parent
b5848ea7a6
commit
434622e282
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
bin
|
bin
|
||||||
build
|
build
|
||||||
|
.idea
|
||||||
|
@ -14,5 +14,9 @@ include_directories(
|
|||||||
include
|
include
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
endif(UNIX)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(sample)
|
add_subdirectory(sample)
|
||||||
|
@ -49,7 +49,7 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define PROFILER_DISABLE profiler::setEnabled(false);
|
#define PROFILER_DISABLE profiler::setEnabled(false);
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifdef _BUILD_PROFILER
|
#ifdef _BUILD_PROFILER
|
||||||
|
@ -21,7 +21,7 @@ name(_name),
|
|||||||
type(0)
|
type(0)
|
||||||
{
|
{
|
||||||
tick(begin);
|
tick(begin);
|
||||||
thread_id = std::this_thread::get_id().hash();
|
thread_id = std::hash<std::thread::id>()(std::this_thread::get_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mark::tick(timestamp_t& stamp)
|
void Mark::tick(timestamp_t& stamp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user