Mutex Lock wait time and watchdog
<p>We are measuring a performance scale of multi threaded real time application. I need to write a adapter to measure the time spent on</p>

<ol>
<li>Waiting time for locking the mutex </li>
<li>Time spent between mutex.lock -> mutex.unlock : critical section execution time </li>
</ol>

<p>and also component like locktimer or watchdog timer. If a thread holding a mutex lock for more than a configured time.. Have to notify to error log..</p>

<p>Any best way of doing this..?</p>
