Skip to content

infilow/relax-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Relax Timer

A simple Hierarchical Timing Wheels timer implementation 'copy' from kafka and rewrite with java from scala, so we can use it both in scala and java.

Related resources:

Usage

<dependency>
    <groupId>com.infilos</groupId>
    <artifactId>relax-timer</artifactId>
    <version>LATEST</version>
</dependency>

And, add a binding for slf4j:

<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>LATEST</version>
</dependency>

And then create time instance and submit tasks:

Timer timer = Timer.create("test-timer").startup();

// print "run..." after 2 seconds
timer.submit(new Runnable() {
    @Override
    public void run() {
        System.out.println("run...");
    }
}, 2000L);

Release

  • Snapshot: mvn clean deploy
  • Release: mvn clean package source:jar gpg:sign install:install deploy:deploy

About

A simple timer implemetation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages