Active Network Interview Question

How to caculate an javascript method's processing time?