use-duration React hook for measuring duration. Demo npm run start Tests npm run components npm run test