Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getclock(3C) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gettimer(3C)

setclock(3C)

getclock(3C)

NAME

getclock − get current value of system-wide clock

SYNOPSIS

#include <sys/timers.h>

int getclock(int clock_type, struct timespec *tp);

DESCRIPTION

getclock() gets the current value tp of the specified system-wide clock, clock_type.

getclock() supports a clock_type of TIMEOFDAY, defined in <sys/timers.h> which clock represents the time-of-day clock for the system.  For this clock, the values returned by getclock() represent the amount of time since the Epoch. 

RETURN VALUE

getclock() returns a value of zero if successful; otherwise it returns a value of −1 and sets errno to indicate the error. 

ERRORS

getclock() fails if any of the following conditions are encountered:

[EINVAL] clock_type does not specify a known system-wide clock. 

[EIO] An error occurred while accessing the clock device. 

SEE ALSO

gettimer(3C), setclock(3C), <sys/timers.h>. 

STANDARDS CONFORMANCE

getclock(): AES

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026