DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

gethz(S-osr5)


gethz -- return the frequency of the system clock in ticks per second

Syntax

cc . . . -lc

int gethz()

Description

gethz returns the frequency of the system clock in ticks per second.

Warning

In the current implementation, gethz searches the environment list (see environ(M)) for a string of the form HZ=val, and returns val. If HZ cannot be interpreted as an integer, gethz returns 0.

If HZ is not defined in the environment, gethz makes a call to sysconf(S-osr5) with parameter _SC_CLK_TCK to determine the value of CLK_TCK. gethz returns the value of CLK_TCK.

Note

The implementation of gethz may change.

See also

environ(M)

Standards conformance

gethz is not part of any currently supported standard; it is an extension of AT&T System V provided by the Santa Cruz Operation.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005