Attached please find a simple example project for using the TCPWM block as a code timer. The code timer can be used to measure the execution of certain pieces of code or events in a project. This is especially helpful during initial development of embedded projects.
The best way to test this project is to run the debugger. A breakpoint can be set after:
captured_time = Code_Timer_GetCounter();
This variable can then be added to the watch window, once it is captured it should match compare_time -1. When running the debugger compare_time can be directly edited to change the delay, and captured_time can be seen to follow this change.