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

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 64 of file RTServerImpl.cc.


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 83 of file RTServerImpl.cc.

References us_time.

double FindMHZ void   )  [static]
 

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

Definition at line 128 of file RTServerImpl.cc.

References cycle_time, get_timeval_us(), 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 102 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 116 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 70 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 94 of file RTServerImpl.cc.

References cycle_time.

Referenced by RTServerImpl::Periodic().


Generated on Fri Oct 22 07:50:54 2004 for CPU Broker by  doxygen 1.3.9.1