⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ticklib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/tickLib.html - generated by refgen from tickLib.c --> <title> tickLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference :  OS Libraries</i></a></p></blockquote><h1>tickLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tickLib</strong> - clock tick support library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./tickLib.html#tickAnnounce">tickAnnounce</a>(&nbsp;)</b>  -  announce a clock tick to the kernel<br><b><a href="./tickLib.html#tickSet">tickSet</a>(&nbsp;)</b>  -  set the value of the kernel's tick counter<br><b><a href="./tickLib.html#tickGet">tickGet</a>(&nbsp;)</b>  -  get the value of the kernel's tick counter<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library is the interface to the VxWorks kernel routines that announce aclock tick to the kernel, get the current time in ticks, and set thecurrent time in ticks.<p>Kernel facilities that rely on clock ticks include <b><a href="./taskLib.html#taskDelay">taskDelay</a>(&nbsp;)</b>, <b><a href="./wdLib.html#wdStart">wdStart</a>(&nbsp;)</b>,<b>kernelTimeslice(&nbsp;)</b>, and semaphore timeouts.  In each case, the specifiedtimeout is relative to the current time, also referred to as "time to fire."Relative timeouts are not affected by calls to <b><a href="./tickLib.html#tickSet">tickSet</a>(&nbsp;)</b>, which only changesabsolute time.  The routines <b><a href="./tickLib.html#tickSet">tickSet</a>(&nbsp;)</b> and <b><a href="./tickLib.html#tickGet">tickGet</a>(&nbsp;)</b> keep track of absolutetime in isolation from the rest of the kernel.<p>Time-of-day clocks or other auxiliary time bases are preferable for lengthytimeouts of days or more.  The accuracy of such time bases is greater, andsome external time bases even calibrate themselves periodically.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>tickLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./kernelLib.html#top">kernelLib</a></b>, <b><a href="./taskLib.html#top">taskLib</a></b>, <b><a href="./semLib.html#top">semLib</a></b>, <b><a href="./wdLib.html#top">wdLib</a></b>,<i>VxWorks Programmer's Guide: Basic OS </i><hr><a name="tickAnnounce"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>tickAnnounce(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tickAnnounce(&nbsp;)</strong> - announce a clock tick to the kernel</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tickAnnounce (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine informs the kernel of the passing of time.  It should becalled from an interrupt service routine that is connected to the systemclock.  The most common frequencies are 60Hz or 100Hz.  Frequencies inexcess of 600Hz are an inefficient use of processor power because thesystem will spend most of its time advancing the clock.  By default,this routine is called by <b><a href="./usrConfig.html#usrClock">usrClock</a>(&nbsp;)</b> in <b>usrConfig.c</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tickLib.html#top">tickLib</a></b>, <b><a href="./kernelLib.html#top">kernelLib</a></b>, <b><a href="./taskLib.html#top">taskLib</a></b>, <b><a href="./semLib.html#top">semLib</a></b>, <b><a href="./wdLib.html#top">wdLib</a></b>,  <i>VxWorks Programmer's Guide: Basic OS</i><hr><a name="tickSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>tickSet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tickSet(&nbsp;)</strong> - set the value of the kernel's tick counter</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tickSet    (    ULONG ticks               /* new time in ticks */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the internal tick counter to a specified value inticks.  The new count will be reflected by <b><a href="./tickLib.html#tickGet">tickGet</a>(&nbsp;)</b>, but will not changeany delay fields or timeouts selected for any tasks.  For example, if atask is delayed for ten ticks, and this routine is called to advance time,the delayed task will still be delayed until ten <b><a href="./tickLib.html#tickAnnounce">tickAnnounce</a>(&nbsp;)</b> calls havebeen made.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tickLib.html#top">tickLib</a></b>, <b><a href="./tickLib.html#tickGet">tickGet</a>(&nbsp;)</b>, <b><a href="./tickLib.html#tickAnnounce">tickAnnounce</a>(&nbsp;)</b><p><hr><a name="tickGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>tickGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tickGet(&nbsp;)</strong> - get the value of the kernel's tick counter</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>ULONG tickGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the current value of the tick counter.This value is set to zero at startup, incremented by <b><a href="./tickLib.html#tickAnnounce">tickAnnounce</a>(&nbsp;)</b>,and can be changed using <b><a href="./tickLib.html#tickSet">tickSet</a>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>The most recent <b><a href="./tickLib.html#tickSet">tickSet</a>(&nbsp;)</b> value, plus all <b><a href="./tickLib.html#tickAnnounce">tickAnnounce</a>(&nbsp;)</b> calls since.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tickLib.html#top">tickLib</a></b>, <b><a href="./tickLib.html#tickSet">tickSet</a>(&nbsp;)</b>, <b><a href="./tickLib.html#tickAnnounce">tickAnnounce</a>(&nbsp;)</b><p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -