All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.satori.composer.runtime.Pulse Maven / Gradle / Ivy

There is a newer version: 0.1.7
Show newest version
package com.satori.composer.runtime;

import java.util.concurrent.*;

public class Pulse {
  public final long ticks;
  public final long now;
  
  public Pulse(long ticks, long now) {
    this.ticks = ticks;
    this.now = now;
  }
  
  public Pulse() {
    this(ticks(), now());
  }
  
  public static long ticks() {
    return TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
  }
  
  public static long now() {
    return System.currentTimeMillis();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy