#include "tmr.h.xx-xxx-xxx"
Functions | |
| int | TMR_initialize (void) |
| Initializes the TMR facility. More... | |
| TMR_tick | TMR_nsecs_to_ticks (int nanoseconds) |
| Convert a number of nanoseconds to PTUs. More... | |
| unsigned int | TMR_ticks_to_nsecs (TMR_tick ticks) |
| Convert a number of ticks to nanoseconds. More... | |
| unsigned int | TMR_frequency (void) |
| Get the frequency of the processor timer. More... | |
Finally, to keep the overhead low, consistent with timing short duration events, certain compromises where made. In general, do not use this facility to time events > 200 secs. The normal system clocks should be used instead.
\bEXAMPLE
-------
TMR_tick beg;
TMR_tick end;
TMR_tick elapsed;
beg = TMR_GET();
.
eventToTime ();
.
end = TMR_GET();
elapsed = end - beg;
printf ("Begin Time: " TMR_FORMAT "tickss\n", beg);
printf ("End Time: " TMR_FORMAT "ticks\n", end);
printf ("Elasped Time: " TMR_FORMAT "tickss\n", elapsed);
printf ("Elasped Time: " TMR_FORMAT "ticks\n",
TMR_TO_NSECS (elapsed);
|
|
Get the frequency of the processor timer.
|
|
|
Initializes the TMR facility.
This is a one time only call to initialize internal data structures. This routine should be called as part of the library initialization sequence. |
|
|
Convert a number of nanoseconds to PTUs.
|
|
|
Convert a number of ticks to nanoseconds.
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002