Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

RTServerImpl.cc File Reference


Detailed Description

Implementation of the RTServerImpl class.

Definition in file RTServerImpl.cc.

Include dependency graph for RTServerImpl.cc:

Include dependency graph

Go to the source code of this file.

Defines

#define MHZ_SLOP   2
 The acceptable difference in successive guesses of the machines Mhz.


Typedefs

typedef signed long long int cycle_time
 Type used for cycle counter values.

typedef double us_time
 Type used for time value in microseconds.


Functions

cycle_time rdtsc (void)
us_time cycle_to_us (cycle_time c)
 Convert a cycle count value generated by rdtsc to a microsecond value.

cycle_time us_to_cycle (us_time us)
 Convert a microsecond value to cycle count value.

us_time get_timeval_us (void)
double my_fabs (double d)
double FindMHZ (void)

Variables

double MHZ
 The CPU frequency for this machine, in megahertz.


Define Documentation

#define MHZ_SLOP   2
 

The acceptable difference in successive guesses of the machines Mhz.

See also:
FindMHZ

Definition at line 62 of file RTServerImpl.cc.

Referenced by FindMHZ().


Function Documentation

us_time cycle_to_us cycle_time  c  )  [inline, static]
 

Convert a cycle count value generated by rdtsc to a microsecond value.

Parameters:
c The cycle value to convert.
Returns:
The 'c' value converted to microseconds.

Definition at line 81 of file RTServerImpl.cc.

References MHZ, and us_time.

double FindMHZ void   )  [static]
 

Returns:
The detected Mhz for the machine where this is running.

Definition at line 126 of file RTServerImpl.cc.

References cycle_time, get_timeval_us(), MHZ_SLOP, my_fabs(), rdtsc(), and us_time.

Referenced by RTServerImpl::RTServerImpl().

Here is the call graph for this function:

us_time get_timeval_us void   )  [static]
 

Returns:
The current time of day in microseconds.

Definition at line 100 of file RTServerImpl.cc.

References us_time.

Referenced by FindMHZ().

double my_fabs double  d  )  [static]
 

Parameters:
d A double value.
Returns:
The absolute value of d.

Definition at line 114 of file RTServerImpl.cc.

Referenced by FindMHZ().

cycle_time rdtsc void   )  [inline, static]
 

Returns:
The current value of the x86 timestamp counter.

Definition at line 68 of file RTServerImpl.cc.

References cycle_time.

Referenced by FindMHZ(), and RTServerImpl::Periodic().

cycle_time us_to_cycle us_time  us  )  [inline, static]
 

Convert a microsecond value to cycle count value.

Parameters:
us The microsecond value to convert.
Returns:
The 'us' value converted to a cycle count.

Definition at line 92 of file RTServerImpl.cc.

References cycle_time, and MHZ.

Referenced by RTServerImpl::Periodic().


Generated on Mon Dec 1 16:30:19 2003 for CPU Broker by doxygen 1.3.4