Tabnine Logo
MonotonicSystemClock
Code IndexAdd Tabnine to your IDE (free)

How to use
MonotonicSystemClock
in
org.eclipse.jgit.util.time

Best Java code snippets using org.eclipse.jgit.util.time.MonotonicSystemClock (Showing top 6 results out of 315)

origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Get clock instance preferred by this system.
 *
 * @return clock instance preferred by this system.
 * @since 4.6
 */
public MonotonicClock getClock() {
  return new MonotonicSystemClock();
}
origin: org.eclipse.jgit/org.eclipse.jgit

  /** {@inheritDoc} */
  @Override
  public ProposedTimestamp propose() {
    final long u = nowMicros();
    return new ProposedTimestamp() {
      @Override
      public long read(TimeUnit unit) {
        return unit.convert(u, MICROSECONDS);
      }

      @Override
      public void blockUntil(Duration maxWait) {
        // Assume system clock never goes backwards.
      }
    };
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Create a default system with a thread pool of 1 thread per CPU.
 */
public KetchSystem() {
  this(defaultExecutor(), new MonotonicSystemClock(), DEFAULT_TXN_NAMESPACE);
}
origin: berlam/github-bucket

  /** {@inheritDoc} */
  @Override
  public ProposedTimestamp propose() {
    final long u = nowMicros();
    return new ProposedTimestamp() {
      @Override
      public long read(TimeUnit unit) {
        return unit.convert(u, MICROSECONDS);
      }

      @Override
      public void blockUntil(Duration maxWait) {
        // Assume system clock never goes backwards.
      }
    };
  }
}
origin: berlam/github-bucket

/**
 * Get clock instance preferred by this system.
 *
 * @return clock instance preferred by this system.
 * @since 4.6
 */
public MonotonicClock getClock() {
  return new MonotonicSystemClock();
}
origin: berlam/github-bucket

/**
 * Create a default system with a thread pool of 1 thread per CPU.
 */
public KetchSystem() {
  this(defaultExecutor(), new MonotonicSystemClock(), DEFAULT_TXN_NAMESPACE);
}
org.eclipse.jgit.util.timeMonotonicSystemClock

Javadoc

A org.eclipse.jgit.util.time.MonotonicClock based on System.currentTimeMillis.

Most used methods

  • <init>
  • nowMicros

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • ImageIO (javax.imageio)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now