Skip to content

Instantly share code, notes, and snippets.

@BensonQiu
BensonQiu / CycleTimer.h
Created April 23, 2016 07:46
Simple mutex vs shared mutex with no contention
#ifndef _SYRAH_CYCLE_TIMER_H_
#define _SYRAH_CYCLE_TIMER_H_
#if defined(__APPLE__)
#if defined(__x86_64__)
#include <sys/sysctl.h>
#else
#include <mach/mach.h>
#include <mach/mach_time.h>
#endif // __x86_64__ or not