Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/nto/Measure.inl

Go to the documentation of this file.
00001 #ifndef __J2K__Measure_INL__
00002 #define __J2K__Measure_INL__
00003 
00004 inline _uint64 Measure::getCycles() 
00005 {
00006   return ClockCycles();
00007 }
00008 
00009 inline double Measure::getCPUfreq()
00010 {
00011   return cpu_freq;
00012 }
00013 
00014 inline ULONG Measure::getClockPeriod()
00015 { 
00016   return clock_period;
00017 }
00018   
00019 inline double Measure::start()
00020 {
00021   start_time = ClockCycles();
00022   return ( start_time / cpu_freq );
00023 }
00024 
00025 inline double Measure::stop()
00026 {
00027   stop_time  = ClockCycles();
00028   return ( stop_time  / cpu_freq );
00029 }
00030 
00031 
00032 inline double Measure::getElapsed()
00033 {
00034    elapsed = ( stop_time - start_time ) / cpu_freq;
00035    return elapsed;
00036 }
00037 
00038 inline void Measure::print()
00039 {
00040   printf( "%6.4f ms", elapsed * Period_1_ms );
00041 }
00042 
00043 inline Measure::Measure( const Measure& src )
00044  : elapsed( src.elapsed ),
00045    start_time( src.start_time ), stop_time( src.stop_time ) { }
00046 
00047 inline const Measure&  Measure::operator = ( const Measure& src )
00048 {
00049   elapsed    = src.elapsed;
00050   start_time = src.start_time;
00051   stop_time  = src.stop_time;
00052 }
00053 
00054 #endif

Generated on Sun Oct 14 18:46:23 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001