Sometimes, you may want to write your own performance measurement code. Make sure that you have exhausted all other options and investigated the available tools first.
You can easily record the length of time for a task by storing the current time before it starts and comparing this to the current time after it finishes, but this approach has many limitations. ...