Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ clock_getres(3) — Tru64 UNIX 5.1b

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

time(1)

ctime(3)

timer_settime(3)

clock_getres(3)  —  Subroutines

NAME

clock_getres − Gets the resolution for the specified clock (P1003.1b)

SYNOPSIS

#include <time.h>
int clock_getres (
clockid_t clock_id,
struct timespec ∗res);

LIBRARY

Realtime Library (librt.so, librt.a)

PARAMETERS

clock_id
The clock type used to obtain the resolution. The CLOCK_REALTIME clock is supported and represents the TIME-OF-DAY clock for the system.

∗resA pointer to the timespec data structure that receives the value of the clock’s resolution. 

DESCRIPTION

The clock_getres function returns the resolution value for the specified clock. If the res argument is NULL, the clock resolution is not returned. 

RETURN VALUES

On a successful call, a value of 0 (zero) is returned. 

On an unsuccessful call, a value of −1 is returned and errno is set to indicate that an error occurred. 

ERRORS

The clock_getres function fails under the following condition:

[EINVAL]
The clock_id argument does not specify a known clock. 

SEE ALSO

Functions: time(1), ctime(3), timer_settime(3)

Guide to Realtime Programming

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