pm_cycles Subroutine

Purpose

Measures processor speed in cycles per second.

Library

Performance Monitor APIs Library (libpmapi.a)

Syntax

#include <pmapi.h>

double pm_cycles (void)

Description

The pm_cycles subroutine uses the Performance Monitor cycle counter and the processor real-time clock to measure the actual processor clock speed. The speed is returned in cycles per second.

Return Values

Item Description
0 An error occurred.
Processor speed in cycles per second No errors occurred.

Files

Item Description
/usr/include/pmapi.h Defines standard macros, data types, and subroutines.