created elapsed.js.
fixed bug about initial metrics.
added forEachGrid utility method and added cancel functionality to elapsed.js.