1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
<HTML
><HEAD
><TITLE
>clock_gethrtime</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
"></HEAD
><BODY
CLASS="REFENTRY"
><H1
><A
NAME="AEN1"
>clock_gethrtime</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN5"
></A
><H2
>Name</H2
>clock_gethrtime -- get high resolution time using the specified clock</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN8"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
> #include <rtl_time.h>
hrtime_t <TT
CLASS="FUNCTION"
>clock_gethrtime</TT
>(clockid_t <TT
CLASS="PARAMETER"
><I
>clock</I
></TT
>);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN12"
></A
><H2
>DESCRIPTION</H2
><P
>This function is a non-portable RTLinux extension. <TT
CLASS="FUNCTION"
>clock_gethrtime</TT
> returns the clock reading in nanoseconds. This is a convenience function for <TT
CLASS="FUNCTION"
>clock_gettime(3)</TT
></P
><P
><TT
CLASS="PARAMETER"
><I
>hrtime_t</I
></TT
> is a 64-bit signed integer.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN19"
></A
><H2
>NOTES</H2
><P
>The following clocks are supported by this release of RTLinux:</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>CLOCK_REALTIME</DT
><DD
><P
>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 <TT
CLASS="FUNCTION"
>clock_settime(3)</TT
> function.</P
></DD
><DT
>CLOCK_MONOTONIC</DT
><DD
><P
>This POSIX clock runs at a steady rate, and is never
adjusted or reset.</P
></DD
><DT
>CLOCK_RTL_SCHED</DT
><DD
><P
>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.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN36"
></A
><H2
>AUTHOR</H2
><P
>Michael Barabanov (<A
HREF="mailto:baraban@fsmlabs.com"
TARGET="_top"
>baraban@fsmlabs.com</A
>)</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN40"
></A
><H2
>SEE ALSO</H2
><A
HREF="rtl_getschedclock.3.html"
TARGET="_top"
>rtl_getschedclock(3)</A
>, <A
HREF="rtl_setclockmode.3.html"
TARGET="_top"
>rtl_setclockmode(3)</A
>, <A
HREF="../susv2/xsh/clock_gettime.html"
TARGET="_top"
>UNIX spec clock_gettime(3)</A
><P
>2001 FSMLabs Inc.</P
><P
>All rights reserved.</P
></DIV
></BODY
></HTML
>
|