Reactive time

Hookless » Adapters » Time

Reactive time as implemented in classes ReactiveInstant and ReactiveDuration is a reactive adapter for Java's Instant and Duration classes. Reactive time acts as a reactive data source that continuously changes. Hookless implementation of reactive time is smart enough to wake up reactive computation only when relevant time threshold is reached. This allows Hookless to provide reactive time with millisecond resolution (or better, depending on platform) with little overhead.

Download

Get Hookless Time from Maven Central:

Tool
<dependency>
    <groupId>com.machinezoo.hookless</groupId>
    <artifactId>hookless-time</artifactId>
    <version>0.1.1</version>
</dependency>

Or clone sources from GitHub or Bitbucket. Configure your build for Java 17+. Sources and binaries are distributed under Apache License 2.0.

If your project is a Java module, add the following declaration to your module-info.java:

requires com.machinezoo.hookless.time;

Documentation

See time package in javadoc. Since the javadoc is not complete yet, you might want to take a look at comments and implementation in sources.