NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Clock Class Reference

A clock returns the time in different time domains. More...

#include <timer.h>

Public Member Functions

timevalue time ()
timevalue clock (timevalue freq, timevalue t_cur=0)
 Returns the current clock in freq-time.
timevalue freq ()
 Frequency of the clock.
timevalue abstime (timevalue thedelta, timevalue freq)
 Returns a timeout in absolute TSC time.
timevalue delta (timevalue theabstime, timevalue freq)
 Returns a delta in another frequency domain from an absolute TSC value.
 Clock (timevalue source_freq)

Protected Attributes

timevalue _source_freq

Detailed Description

A clock returns the time in different time domains.

The reference clock is the CPUs TSC.

Constructor & Destructor Documentation

Clock::Clock ( timevalue  source_freq)
inline

Member Function Documentation

timevalue Clock::abstime ( timevalue  thedelta,
timevalue  freq 
)
inline

Returns a timeout in absolute TSC time.

Parameters
thedeltaThe timeout
freqScale of thedelta

The timeout equals to thedelta/freq seconds.

Example: abstime(5, 1000) returns the time of now plus 5 milliseconds.

timevalue Clock::clock ( timevalue  freq,
timevalue  t_cur = 0 
)
inline

Returns the current clock in freq-time.

timevalue Clock::delta ( timevalue  theabstime,
timevalue  freq 
)
inline

Returns a delta in another frequency domain from an absolute TSC value.

timevalue Clock::freq ( )
inline

Frequency of the clock.

timevalue Clock::time ( )
inline

Member Data Documentation

timevalue Clock::_source_freq
protected

The documentation for this class was generated from the following file: