Introducing TimeProfiler - a Java package that simplifies timing the execution of functions. With TimeProfiler, you can easily measure the time it takes to run a single function, multiple functions, or a single function multiple times.
The package provides four methods: timeIt, batchTimeIt, timeIt for an array of functions, and batchTimeIt for an array of functions. Simply pass in the function(s) and the desired batch size, and TimeProfiler will return the duration(s) of execution. The package uses Java's Instant and Duration classes to accurately measure time.
This projects was done with pure academic purposes to get me started with functional programming, so its performance is not that good.
Try out TimeProfiler today and optimize your code!