I want to create a stopwatch in my Android application that starts running when the user presses start and continues to run and enables the user to time specific intervals.
Use case: The user presses "start timing" and the stopwatch starts. The user presses "stop timing", the stopwatch continues to run but counts the length of the interval. After sometime the user presses "start timing" again and then after some time "stop timing" and so on.
In the end I want to be able to build the following table:
start time end time
00:00 00:10
00:15 00:20
...
I am using a chronometer and have tried this, and this, but they both require me to stop the chronometer which I don't want to do.
I can solve this by creating two chronometers, one visible that runs and gets start times and another invisible one for timing the intervals, but am wondering if this could be done in a more elegant way.
Thank you!