Class PerfTimer

java.lang.Object
org.yamcs.utils.PerfTimer

public class PerfTimer extends Object
A simple timer that can be inserted in the code to measure the performance of certain operations.

Relies on System.nanoTime() called before and after the operation.

Prints on the standard output from time to time the number of nanoseconds per operation

  • Constructor Details

    • PerfTimer

      public PerfTimer(String name, int numOps)
      name will be printed in the output

      numOps is how many operations it should time and print the result for

  • Method Details

    • before

      public void before()
    • after

      public void after()