Added a basic function to measure delays.