module ti.sysbios.family.windows.TimestampProvider |
|
|
TimestampProvider implementation for Windows
#include <ti/sysbios/family/windows/TimestampProvider.h>
Functions common to all ITimestampClient modules |
Bits32 | |
Void | |
Void | |
Functions common to all target modules |
|
|
Constants |
| |
DETAILS
This module provides an implementation on Windows for the
xdc.runtime.ITimestampProvider
interface.
On Windows, the timestamp counter value is computed from the
accumulated CPU user time spent running the SYS/BIOS application.
This emulates a hardware timestamp counter by eliminating all
the CPU time spent running the Windows kernel and other Windows
applications.
It is important to understand that although Windows uses a
real-time counter to accumulate the user time of a process,
the accumulated total is updated only once every 10 milliseconds.
Therefore, it is quite likely that two consecutive calls to
TimestampProvider_get32() or
TimestampProvider_get64() or will return the same
value. In fact, the returned value will only change the next time
Windows updates the accumulated user time.
Calling Context
Function | Hwi | Swi | Task | Main | Startup |
get32 | Y | Y | Y | Y | N |
get64 | Y | Y | Y | Y | N |
getFreq | Y | Y | Y | Y | N |
Definitions:
- Hwi: API is callable from a Hwi thread.
- Swi: API is callable from a Swi thread.
- Task: API is callable from a Task thread.
- Main: API is callable during any of these phases:
- In your module startup after this module is started (e.g. TimestampProvider_Module_startupDone() returns TRUE).
- During xdc.runtime.Startup.lastFxns.
- During main().
- During BIOS.startupFxns.
- Startup: API is callable during any of these phases:
- During xdc.runtime.Startup.firstFxns.
- In your module startup before this module is started (e.g. TimestampProvider_Module_startupDone() returns FALSE).
|
config TimestampProvider_E_processTimes // module-wide |
|
Error: GetProcessTimes failed
extern const Error_Id TimestampProvider_E_processTimes;
DETAILS
A call to GetProcessTimes in the Win32 API has failed.
RAISED_IN
TimestampProvider_get32() // module-wide |
|
Return a 32-bit timestamp
Bits32 TimestampProvider_get32();
DETAILS
See the details section above for implementation details.
RETURNS
Returns a 32-bit timestamp value.
Use
getFreq to convert this value into units of real time.
SEE
TimestampProvider_get64() // module-wide |
|
Return a 64-bit timestamp
ARGUMENTS
result
pointer to 64-bit result
This parameter is a pointer to a structure representing a 64-bit
wide timestamp value where the current timestamp is written.
If the underlying hardware does not support 64-bit resolution, the
hi field of
result is always set to 0; see
xdc.runtime.Types.Timestamp64. So, it is possible for
the
lo field to wrap around without any change to the
hi field.
Use
getFreq to convert this value into units of real
time.
DETAILS
See the details section above for implementation details.
SEE
TimestampProvider_getFreq() // module-wide |
|
Return the timestamp counter tick rate
ARGUMENTS
freq
pointer to a 64-bit result
This parameter is a pointer to a structure representing a 64-bit
wide frequency value where the timer's frequency (in Hz)
is written; see
xdc.runtime.Types.FreqHz.
This function provides a way of converting timestamp
values into units of real time.
DETAILS
This function returns the rate, specified in hertz, at which
the timestamp counter ticks. In other words, it is how many ticks
per second the timestamp counter will tick.
SEE
Module-Wide Built-Ins |
|
// Get this module's unique id
Bool TimestampProvider_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool TimestampProvider_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 TimestampProvider_Module_getMask();
// Returns the diagnostics mask for this module
Void TimestampProvider_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
var TimestampProvider = xdc.useModule('ti.sysbios.family.windows.TimestampProvider');
module-wide config parameters
msg: "GetProcessTimes failed: %d"
};
generated on Thu, 01 Mar 2012 16:57:53 GMT