0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

Linux build

This commit is contained in:
Sergey Yagovtsev 2016-02-17 23:24:35 +03:00
parent b5848ea7a6
commit 434622e282
4 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
bin bin
build build
.idea

View File

@ -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)

View File

@ -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

View File

@ -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)