DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

gethz(S)


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) 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.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003