Pregunta de entrevista de Active Network

How to caculate an javascript method's processing time?