There is a demo snippet in the latest SDK.
You can check the "thread_monitor" folder to see if it suffices your needs.
The link to the latest SDK is here
Let us know if you need more information.
Thanks but not really what i was looking, the sample demonstrate the use of app thread watch dog. Instead, i needed something to calculate the overall CPU usage of my application which can contain many threads and taking into account WICED SDK usage as well. I'm pretty sure it can be done by creating a performance measurement thread that calculate the "free" time according to CPU clock, etc...