Mercurial > hg > Game > Cerium
view TaskManager/Fifo/gettime.h @ 1876:5e17ab506299 draft
change CPU_TYPE SPE_ANY to IO/0 ( cannot running )
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 30 Dec 2013 20:52:21 +0900 |
parents | e9dc25836520 |
children |
line wrap: on
line source
#ifndef GETTIME_H_ #define GETTIME_H_ #include <time.h> #ifdef __APPLE__ #include "rdtsc.h" #endif inline unsigned long long gettime() { unsigned long long time = 0; #ifndef __APPLE__ struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); time = ((ts.tv_sec << 32) | ts.tv_nsec ); #else time = rdtsc(); #endif return time; } #endif