Exemple #1
0
  public JTester() {
    // time how long for the gui to load
    m_timerMillis.start();
    m_timerNanos.start();

    init_lnf();

    initComponents();

    long nanos = m_timerNanos.elapsedNanos();
    double millis2 = m_timerNanos.elapsedMillis();
    double secs2 = m_timerNanos.elapsedSeconds();
    long millis = m_timerMillis.elapsedMillis();
    double secs = m_timerMillis.elapsedSeconds();

    System.out.println(
        "gui startup time: "
            + nanos
            + " nanos, "
            + millis2
            + " milliseconds, "
            + secs2
            + " seconds.");
    System.out.println("gui startup time: " + millis + " milliseconds, " + secs + " seconds.");

    // reset the timer
    m_timerMillis.reset();
    m_timerNanos.reset();

    // time how long we used this application
    m_timerMillis.start();
    m_timerNanos.start();
  }
Exemple #2
0
  private void normal_exit() {
    // at the end make sure we notify SingleAppInstance
    // that our application finished...
    m_inst.onExit();

    long nanos = m_timerNanos.elapsedNanos();
    double millis2 = m_timerNanos.elapsedMillis();
    double secs2 = m_timerNanos.elapsedSeconds();
    long millis = m_timerMillis.elapsedMillis();
    double secs = m_timerMillis.elapsedSeconds();
    System.out.println(
        "user time: "
            + nanos
            + " nanoseconds, "
            + millis2
            + " milliseconds, "
            + secs2
            + " seconds.");
    System.out.println("user time: " + millis + " milliseconds, " + secs + " seconds.");

    System.exit(0);
  }