TSCClock.hh

Go to the documentation of this file.
00001 #ifndef TSCCLOCK_HH_
00002 #define TSCCLOCK_HH_
00003 
00004 #include "Clock.hh"
00005 
00006 namespace certi {
00018 class CERTI_EXPORT TSCClock : public Clock
00019 {
00020 public:
00021     TSCClock();
00026     virtual double getResolution();
00031     virtual uint64_t getCurrentTicksValue();
00038     virtual double   tick2NanoSecond(const uint64_t ticks);
00039     virtual ~TSCClock();
00040 private:
00045     static double getProcessorFrequency();
00046 
00051     inline uint64_t readTSC() {
00052       uint64_t tsc;
00053       __asm__ __volatile__("rdtsc" : "=A" (tsc));
00054       return tsc;
00055     };
00056 
00060     double resolution;
00061 
00062 };
00063 }
00064 #endif /*TSCCLOCK_HH_*/

Generated on Thu Apr 30 15:53:50 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5