Closed rodnaph closed 7 months ago
Sorry for the CI failure, it's fixed by #100.
Hi, I like this idea, this feature is indeed missing!
What about adding a getLapTime()
as well, to be able to get the duration since the last start without stopping?
By the way you can rebase now, this will fix the CS issue.
What about adding a
getLapTime()
as well, to be able to get the duration since the last start without stopping?
Thanks, I've added that method, let me know if there's anything I've missed.
Apart from this, returning the duration in stop()
looks good to me, @rodnaph. Let's fix the nitpicks and merge it!
Thank you, @rodnaph!
Return the lap duration when stopping the
Stopwatch
, which will be the duration since the last start.If the stopwatch is not started, then the duration will be zero.
Use case - using a stopwatch to perform multiple duration timings, and then fetch the total elapsed time at the end (I can't see this is possible now, please direct me if I've just overlooked it though).
Note: CI failure does not seem related to my changes, as above though let me know if I missed something.