📄 timexlib.html
字号:
timexPre i,func,[args...] Add pre-timing function number i. timexPost i,func,[args...] Add post-timing function number i. timexShow Show all functions to be called. Notes: 1) timexN() will repeat calls enough times to get timing accuracy to approximately 2%. 2) A single function can be specified with timex() and timexN(); or, multiple functions can be pre-set with timexFunc(). 3) Up to 4 functions can be pre-set with timexFunc(), timexPre(), and timexPost(), i.e., i in the range 0 - 3. 4) timexPre() and timexPost() allow locking/unlocking, or raising/lowering priority before/after timing.</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./timexLib.html#top">timexLib</a></b><hr><a name="timex"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>timex</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>timex</i>( )</strong> - time a single execution of a function or functions</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void timex ( FUNCPTR func, /* function to time (optional) */ int arg1, /* first of up to 8 args to call function with (optional) */ int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine times a single execution of a specified function with up toeight of the function's arguments. If no function is specified, it timesthe execution of the current list of functions to be timed,which is created using <b><i><a href="./timexLib.html#timexFunc">timexFunc</a></i>( )</b>, <b><i><a href="./timexLib.html#timexPre">timexPre</a></i>( )</b>, and <b><i><a href="./timexLib.html#timexPost">timexPost</a></i>( )</b>.If <b><i><a href="./timexLib.html#timex">timex</a></i>( )</b> is executed with a function argument, the entire current listis replaced with the single specified function.<p>When execution is complete, <b><i><a href="./timexLib.html#timex">timex</a></i>( )</b> displays the execution time.If the execution was so fast relative to the clock rate that the time ismeaningless (error > 50%), a warning message is printed instead. In suchcases, use <b><i><a href="./timexLib.html#timexN">timexN</a></i>( )</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./timexLib.html#top">timexLib</a></b>, <b><i><a href="./timexLib.html#timexFunc">timexFunc</a></i>( )</b>, <b><i><a href="./timexLib.html#timexPre">timexPre</a></i>( )</b>, <b><i><a href="./timexLib.html#timexPost">timexPost</a></i>( )</b>, <b><i><a href="./timexLib.html#timexN">timexN</a></i>( )</b><hr><a name="timexN"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>timexN</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>timexN</i>( )</strong> - time repeated executions of a function or group of functions</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void timexN ( FUNCPTR func, /* function to time (optional) */ int arg1, /* first of up to 8 args to call function with */ int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine times the execution of the current list of functions to betimed in the same manner as <b><i><a href="./timexLib.html#timex">timex</a></i>( )</b>; however, the list of functionsis called a variable number of times until sufficient resolutionis achieved to establish the time with an error less than 2%. (Since eachiteration of the list may be measured to a resolution of +/- 1 clocktick, repetitive timings decrease this error to 1/N ticks, where N isthe number of repetitions.)<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./timexLib.html#top">timexLib</a></b>, <b><i><a href="./timexLib.html#timexFunc">timexFunc</a></i>( )</b>, <b><i><a href="./timexLib.html#timex">timex</a></i>( )</b><hr><a name="timexPost"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>timexPost</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>timexPost</i>( )</strong> - specify functions to be called after timing</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void timexPost ( int i, /* function number in list (0..3) */ FUNCPTR func, /* function to be added (NULL if to be deleted) */ int arg1, /* first of up to 8 args to call function with */ int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds or deletes functions in the list of functions to becalled immediately following the timed functions. A maximum of fourfunctions may be included. Up to eight arguments may be passed to eachfunction.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./timexLib.html#top">timexLib</a></b><hr><a name="timexPre"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>timexPre</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>timexPre</i>( )</strong> - specify functions to be called prior to timing</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void timexPre ( int i, /* function number in list (0..3) */ FUNCPTR func, /* function to be added (NULL if to be deleted) */ int arg1, /* first of up to 8 args to call function with */ int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds or deletes functions in the list of functions to becalled immediately prior to the timed functions. A maximum of fourfunctions may be included. Up to eight arguments may be passed to eachfunction.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./timexLib.html#top">timexLib</a></b><hr><a name="timexShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>timexShow</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>timexShow</i>( )</strong> - display the list of function calls to be timed</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void timexShow (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the current list of function calls to be timed.These lists are created by calls to <b><i><a href="./timexLib.html#timexPre">timexPre</a></i>( )</b>, <b><i><a href="./timexLib.html#timexFunc">timexFunc</a></i>( )</b>, and<b><i><a href="./timexLib.html#timexPost">timexPost</a></i>( )</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./timexLib.html#top">timexLib</a></b>, <b><i><a href="./timexLib.html#timexPre">timexPre</a></i>( )</b>, <b><i><a href="./timexLib.html#timexFunc">timexFunc</a></i>( )</b>, <b><i><a href="./timexLib.html#timexPost">timexPost</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -