Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 778 Bytes

File metadata and controls

27 lines (15 loc) · 778 Bytes

Measuring execution time in Dart

Ever wanted to measure how long a network request takes in Dart?

This is easily done by creating a helper function that calculates the difference between two dates. 👇


Then, you can wrap any asynchronous code block inside the function and reuse it as needed.

Very useful for benchmarking the execution time of your backend or database calls. 👌


Found this useful? Show some love and share the original tweet 🙏


Previous Next
Find the Invalid Switch Expression 🧐 Are global variables bad?