Active Network interview question

How to caculate an javascript method's processing time?