MIL_ID ContextAppId, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE *TimePtr | //in-out |
This function controls or inquires a MIL timer's setting or value. There is a different MIL timer for each thread of the application, and one global MIL timer for the application. There is also a separate non-resettable trace MIL timer used by Matrox Profiler and other MIL trace functionality. By default, the MIL timer that is accessed is the timer of the current thread.
This function is useful for benchmarking operations in a MIL application. The timer resolution varies according to the hardware and operating system used.
Note that MIL functions run at a slower speed during debug mode. Therefore, once you are done debugging your application, you should compile in release mode to achieve maximum processing speed.
Specifies the identifier of the application context to use.
For specifying the application
context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the current application context. |
||||||||||||||||||||||||||||||||||||||
Application Context Identifier |
Specifies the application context identifier. |
Specifies the control to exert on the MIL timer. It can be set to one of the following:
For MIL timers
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_TIMER_READ + |
Reads the time, in sec, of the MIL timer since the last reset. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TIMER_RESET + |
Resets the MIL timer to zero. |
||||||||||||||||||||||||||||||||||||||
M_TIMER_RESOLUTION + |
Reads the MIL timer resolution, in seconds. |
||||||||||||||||||||||||||||||||||||||
M_TIMER_WAIT + |
Waits for the specified period of time, in sec, before returning. |
You can add the following value to the above-mentioned values to set whether the function will be called synchronously.
For all ControlType
parameters
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_SYNCHRONOUS |
Forces the function to wait for all pending calls of the current thread to complete before continuing. |
You can add one of the following values to the above-mentioned values to specify to access the global MIL timer or the trace MIL timer, instead of the timer of the current thread.
For controlling and accessing the global
MIL timer or trace MIL timer
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_GLOBAL |
Executes the requested timer operation using the global MIL timer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TRACE |
Executes the requested timer operation using the trace MIL timer. (more details...) |
Specifies the address of the variable in which to store the timer information produced by M_TIMER_READ or M_TIMER_RESOLUTION. Since MappTimer() also returns the requested information when M_TIMER_READ or M_TIMER_RESOLUTION are selected, you can set this parameter to M_NULL.
For M_TIMER_RESET, set TimePtr to M_NULL.
For M_TIMER_WAIT, TimePtr specifies the address of the variable from which to read the timer information.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |