23.07.2013 Views

HP-UX 11i Knowledge-on-Demand

HP-UX 11i Knowledge-on-Demand

HP-UX 11i Knowledge-on-Demand

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Mercury private: time functi<strong>on</strong>s<br />

• hg_gethrcycles(): time in machine-dependent cycles since<br />

the machine has booted; adjusted to match M<strong>on</strong>arch<br />

• hg_gethrtime(): time in nanosec<strong>on</strong>ds since the machine<br />

booted; adjusted to match M<strong>on</strong>arch; very comparable to<br />

the widely used gethrtime(), <strong>on</strong>ly faster<br />

• hg_nano_to_cycle_ratio(): useful if you wish to record your<br />

raw data in cycles (because hg_gethrcycles is the fastest)<br />

and later c<strong>on</strong>vert them to nanosec<strong>on</strong>ds for output<br />

• hg_busywait(): just spin wait for a fixed amount of real<br />

time; changing processors will not throw this off; a problem<br />

solved compared to spin waiting using the ITC<br />

<str<strong>on</strong>g>HP</str<strong>on</strong>g>-<str<strong>on</strong>g>UX</str<strong>on</strong>g> <str<strong>on</strong>g>11i</str<strong>on</strong>g> v3 Training

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!