-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added separate row for "Merge preparation" in times report
- Loading branch information
Showing
10 changed files
with
107 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/dev/webfx/cli/util/stopwatch/StopWatchGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package dev.webfx.cli.util.stopwatch; | ||
|
||
import java.util.Arrays; | ||
|
||
/** | ||
* @author Bruno Salmon | ||
*/ | ||
public class StopWatchGroup { | ||
|
||
private StopWatch runningStopWatch; | ||
private StopWatch pausedStopWatch; | ||
private boolean internalSyncing; | ||
|
||
public StopWatchGroup() { | ||
} | ||
|
||
public StopWatchGroup(StopWatch... stopWatches) { | ||
Arrays.stream(stopWatches).forEach(stopWatch -> stopWatch.setGroup(this)); | ||
} | ||
|
||
void updateStopWatchRunningState(StopWatch stopWatch, boolean running) { | ||
if (internalSyncing) | ||
return; | ||
internalSyncing = true; | ||
if (running && runningStopWatch != stopWatch) { | ||
if (runningStopWatch != null) { | ||
runningStopWatch.off(); | ||
pausedStopWatch = runningStopWatch; | ||
} | ||
runningStopWatch = stopWatch; | ||
} | ||
if (!running && runningStopWatch == stopWatch) { | ||
if (pausedStopWatch != null) { | ||
pausedStopWatch.on(); | ||
runningStopWatch = pausedStopWatch; | ||
} else | ||
runningStopWatch = null; | ||
pausedStopWatch = null; | ||
} | ||
internalSyncing = false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version=0.1.0-SNAPSHOT | ||
build.timestamp=2024-06-02 08:05 | ||
build.timestamp=2024-06-02 13:57 |