clock_gethrtime

Name

clock_gethrtime -- get high resolution time using the specified clock

Synopsis

       #include <rtl_time.h>

       hrtime_t clock_gethrtime(clockid_t clock);

DESCRIPTION

This function is a non-portable RTLinux extension. clock_gethrtime returns the clock reading in nanoseconds. This is a convenience function for clock_gettime(3)

hrtime_t is a 64-bit signed integer.

NOTES

The following clocks are supported by this release of RTLinux:

CLOCK_REALTIME

This is the standard POSIX realtime clock. The values returned by clock_gettime for this clock represent the time elapsed since the Epoch. This clock can be adjusted with the clock_settime(3) function.

CLOCK_MONOTONIC

This POSIX clock runs at a steady rate, and is never adjusted or reset.

CLOCK_RTL_SCHED

The clock that the scheduler uses for task scheduling. The time values passed to pthread_make_periodic_np are normally specified relative to this clock.

AUTHOR

Michael Barabanov (baraban@fsmlabs.com)

SEE ALSO

rtl_getschedclock(3), rtl_setclockmode(3), UNIX spec clock_gettime(3)

©2001 FSMLabs Inc.

All rights reserved.