SplitStopWatch

Using this tool you can streamline your debug-output when timing the duration of your methods or tasks.

License

License

GroupId

GroupId

info.unterrainer.commons
ArtifactId

ArtifactId

splitstopwatch
Last Version

Last Version

0.3.1
Release Date

Release Date

Type

Type

jar
Description

Description

SplitStopWatch
Using this tool you can streamline your debug-output when timing the duration of your methods or tasks.
Project URL

Project URL

https://github.com/UnterrainerInformatik/java-splitstopwatch
Project Organization

Project Organization

Unterrainer Informatik OG
Source Code Management

Source Code Management

https://github.com/UnterrainerInformatik/splitstopwatch

Download splitstopwatch

How to add to project

<!-- https://jarcasting.com/artifacts/info.unterrainer.commons/splitstopwatch/ -->
<dependency>
    <groupId>info.unterrainer.commons</groupId>
    <artifactId>splitstopwatch</artifactId>
    <version>0.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/info.unterrainer.commons/splitstopwatch/
implementation 'info.unterrainer.commons:splitstopwatch:0.3.1'
// https://jarcasting.com/artifacts/info.unterrainer.commons/splitstopwatch/
implementation ("info.unterrainer.commons:splitstopwatch:0.3.1")
'info.unterrainer.commons:splitstopwatch:jar:0.3.1'
<dependency org="info.unterrainer.commons" name="splitstopwatch" rev="0.3.1">
  <artifact name="splitstopwatch" type="jar" />
</dependency>
@Grapes(
@Grab(group='info.unterrainer.commons', module='splitstopwatch', version='0.3.1')
)
libraryDependencies += "info.unterrainer.commons" % "splitstopwatch" % "0.3.1"
[info.unterrainer.commons/splitstopwatch "0.3.1"]

Dependencies

compile (4)

Group / Artifact Type Version
org.mapstruct : mapstruct-processor jar 1.3.0.Final
org.slf4j : slf4j-api jar 2.0.0-alpha0
org.slf4j : slf4j-log4j12 jar 2.0.0-alpha0
org.slf4j : slf4j-simple jar 2.0.0-alpha1

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.12

test (5)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-engine jar 5.7.0
org.junit.jupiter : junit-jupiter-api jar 5.7.0
org.assertj : assertj-core jar 3.15.0
org.mockito : mockito-core jar 3.5.15
org.mockito : mockito-junit-jupiter jar 3.5.15

Project Modules

There are no modules declared in this project.

NuGet NuGet license

General

This section contains various useful projects that should help your development-process.

This section of our GIT repositories is free. You may copy, use or rewrite every single one of its contained projects to your hearts content.
In order to get help with basic GIT commands you may try the GIT cheat-sheet on our homepage.

This repository located on our homepage is private since this is the master- and release-branch. You may clone it, but it will be read-only.
If you want to contribute to our repository (push, open pull requests), please use the copy on github located here: the public github repository

IconSplitStopWatch

This PCL implements a stopWatch.

Additionally to the normal stopWatch-functionality it may be used to debug out split-times as well. It measures the split-times and keeps track of the overall times in a variable.
Don't be afraid to stop the watch. Stopping doesn't mean you loose any value whatsoever. Think of it as a real-life stopWatch where you may press the start-button at any time after previously pressing the stop-button.

This class provides useful overloads that allow writing to a stream in a way that your measurement doesn't get compromised (the stopWatch is paused while writing to the stream). You may initialize it with a stream so that you can use all the overloads that take a string-argument or Console.Out is used as a default.
All the write-operations are performed as a printLine-call, so you don't need to close your assigned text with a newline-character.

It has a property 'isActive' that defaults to true. When this is set to false all calls to this class are aborted within a single if-statement in the called method. This is a convenience function so that you may leave your logging-code in the production code.

If you like this repo, please don't forget to star it. Thank you.

Example

SplitStopWatch ssw = new SplitStopWatch();
ssw.start("started.");
  Thread.sleep(10);
ssw.split("split.");
  Thread.sleep(10);
ssw.stop("stopped.");
info.unterrainer.commons

Unterrainer Informatik OG

We develop software and games and try to involve you in this process.

Versions

Version
0.3.1