Timer to measure time elapsed