Check execution time

Added a function to measure the execution time using performance.now().
This feature will not be executed in browsers that lack implementation
of performance.now().