net.digger:utils

A collection of small utility classes.

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.digger
Идентификатор

Идентификатор

utils
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

net.digger:utils
A collection of small utility classes.
Ссылка на сайт

Ссылка на сайт

https://github.com/diggernet/JavaUtils
Система контроля версий

Система контроля версий

https://github.com/diggernet/JavaUtils/tree/develop

Скачать utils

Как подключить последнюю версию

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

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.hamcrest : hamcrest-library jar 1.3

Модули Проекта

Данный проект не имеет модулей.

JavaUtils

JavaUtils is a collection of small utility classes. It includes tools to pause a thread with finer control than the standard tools, and to measure elapsed time.

Maven configuration

	<dependency>
		<groupId>net.digger</groupId>
		<artifactId>utils</artifactId>
		<version>1.0.0</version>
	</dependency>

Pause

Pause is a tool to pause a thread for a period of time, with finer control than the standard tools. For example, you could call

	TimeUnit.MICROSECONDS.sleep(micros);

or

	TimeUnit.NANOSECONDS.sleep(nanos);

but currently both of those internally just call

	Thread.sleep(millis);

so you don't have any control below 1 millisecond.

Pause gives you control well below that threshold, down to microseconds and makes a good effort at nanoseconds. Precision at that level depends on your machine and your JVM. I get good results down to around a few tens of microseconds. Your results may vary.

Usage

	Pause.second(seconds);

	Pause.milli(milliseconds);

	Pause.micro(microseconds);

	Pause.nano(nanoseconds);

Timer

A simple little tool to quickly check the elapsed time for a block of code.

Usage

	long elapsed = Timer.time(() -> {
		// your code here
	});

License

These utilities are provided under the terms of the GNU LGPLv3.

Версии библиотеки

Версия
1.0.0