Fixing a bunch of alloy clang issues.

This commit is contained in:
Ben Vanik
2014-07-12 21:52:33 -07:00
parent 9b78dd977b
commit 7ee79318e8
13 changed files with 157 additions and 56 deletions

View File

@@ -9,12 +9,16 @@
#include <poly/threading.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <pthread.h>
#include <time.h>
namespace poly {
namespace threading {
uint64_t ticks() { return mach_absolute_time(); }
uint32_t current_thread_id() {
mach_port_t tid = pthread_mach_thread_np(pthread_self());
return static_cast<uint32_t>(tid);