<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Clocks and Timers [POSIX Section 14]</TITLE
|
>Clocks and Timers [POSIX Section 14]</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="POSIX Standard Support"
|
TITLE="POSIX Standard Support"
|
HREF="posix-standard-support.html"><LINK
|
HREF="posix-standard-support.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="Execution Scheduling [POSIX Section 13]"
|
TITLE="Execution Scheduling [POSIX Section 13]"
|
HREF="posix-execution-scheduling.html"><LINK
|
HREF="posix-execution-scheduling.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="Message Passing [POSIX Section 15]"
|
TITLE="Message Passing [POSIX Section 15]"
|
HREF="posix-message-passing.html"></HEAD
|
HREF="posix-message-passing.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="SECT1"
|
CLASS="SECT1"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="posix-execution-scheduling.html"
|
HREF="posix-execution-scheduling.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
>Chapter 31. POSIX Standard Support</TD
|
>Chapter 31. POSIX Standard Support</TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="posix-message-passing.html"
|
HREF="posix-message-passing.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><H1
|
><H1
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><A
|
><A
|
NAME="POSIX-CLOCKS-AND-TIMERS">Clocks and Timers [POSIX Section 14]</H1
|
NAME="POSIX-CLOCKS-AND-TIMERS">Clocks and Timers [POSIX Section 14]</H1
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN13230">Functions Implemented</H2
|
NAME="AEN13230">Functions Implemented</H2
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>int clock_settime( clockid_t clock_id,
|
>int clock_settime( clockid_t clock_id,
|
const struct timespec *tp);
|
const struct timespec *tp);
|
int clock_gettime( clockid_t clock_id, struct timespec *tp);
|
int clock_gettime( clockid_t clock_id, struct timespec *tp);
|
int clock_getres( clockid_t clock_id, struct timespec *tp);
|
int clock_getres( clockid_t clock_id, struct timespec *tp);
|
int timer_create( clockid_t clock_id, struct sigevent *evp,
|
int timer_create( clockid_t clock_id, struct sigevent *evp,
|
timer_t *timer_id);
|
timer_t *timer_id);
|
int timer_delete( timer_t timer_id );
|
int timer_delete( timer_t timer_id );
|
int timer_settime( timer_t timerid, int flags,
|
int timer_settime( timer_t timerid, int flags,
|
const struct itimerspec *value,
|
const struct itimerspec *value,
|
struct itimerspec *ovalue );
|
struct itimerspec *ovalue );
|
int timer_gettime( timer_t timerid, struct itimerspec *value );
|
int timer_gettime( timer_t timerid, struct itimerspec *value );
|
int timer_getoverrun( timer_t timerid );
|
int timer_getoverrun( timer_t timerid );
|
int nanosleep( const struct timespec *rqtp, struct timespec *rmtp);</PRE
|
int nanosleep( const struct timespec *rqtp, struct timespec *rmtp);</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN13233">Functions Omitted</H2
|
NAME="AEN13233">Functions Omitted</H2
|
><P
|
><P
|
><none></P
|
><none></P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN13236">Notes</H2
|
NAME="AEN13236">Notes</H2
|
><P
|
><P
|
></P
|
></P
|
><UL
|
><UL
|
><LI
|
><LI
|
><P
|
><P
|
> Currently <SPAN
|
> Currently <SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>timer_getoverrun()</I
|
>timer_getoverrun()</I
|
></SPAN
|
></SPAN
|
> only
|
> only
|
reports timer notifications that are delayed in the timer
|
reports timer notifications that are delayed in the timer
|
subsystem. If they are delayed in the signal subsystem, due to
|
subsystem. If they are delayed in the signal subsystem, due to
|
signal masks for example, this is not counted as an overrun.
|
signal masks for example, this is not counted as an overrun.
|
</P
|
</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
> The option CYGPKG_POSIX_TIMERS allows the timer support to be
|
> The option CYGPKG_POSIX_TIMERS allows the timer support to be
|
enabled or disabled, and causes _POSIX_TIMERS to be defined
|
enabled or disabled, and causes _POSIX_TIMERS to be defined
|
appropriately. This will cause other parts of the POSIX system to
|
appropriately. This will cause other parts of the POSIX system to
|
have limited functionality.
|
have limited functionality.
|
</P
|
</P
|
></LI
|
></LI
|
></UL
|
></UL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="posix-execution-scheduling.html"
|
HREF="posix-execution-scheduling.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="posix-message-passing.html"
|
HREF="posix-message-passing.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>Execution Scheduling [POSIX Section 13]</TD
|
>Execution Scheduling [POSIX Section 13]</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="posix-standard-support.html"
|
HREF="posix-standard-support.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>Message Passing [POSIX Section 15]</TD
|
>Message Passing [POSIX Section 15]</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|