Elapsed time for all events {@code from} through {@code to} for the current thread.
7702
public double getElapsedTimeCurrentThread(int from, int to) {
	   Accumulator acc = getAccForThread();

	   return acc == null ? Double.NaN : (acc.currentTimes[to] - acc.currentTimes[from]) / MILLION;
   }
672670
def elapsed(time)
      time = time.to_i
      if time <= MINUTE
        "#{time} sec"
      elsif time <= HOUR
        minutes = time / MINUTE
        seconds = time - (minutes * MINUTE)
        "#{minutes} min #{seconds} sec"
      elsif time <= DAY
        hours = time / HOUR
        minutes = (time - (hours * HOUR)) / MINUTE
        "#{hours} hr #{minutes} min"
      else
        days = time / DAY
        hours = (time - (days * DAY)) / HOUR
        minutes = (time - (days * DAY) - (hours * HOUR)) / MINUTE
        "#{days} day#{days == 1 ? '' : 's'} #{hours} hr #{minutes} min"
      end
    end
370777
public synchronized float probesPerSecond() {

    Instant now = new Instant();

    Instant event = null;
    int events = 0;
    boolean done = false;
    long timeWindow = 0;
    long oldestTime = 0;

    do {
      event = messages.poll();
      if (event != null) {
        events++;
        if (events == 1)
          oldestTime = event.getMillis();
        done = event.getMillis() >= now.getMillis();
      } else {
        done = true;
      }
    } while (!done);

    timeWindow = now.getMillis() - oldestTime;

    float mps = (float) events / timeWindow;
    mps = (float) (mps * 1000.0);

    return mps;

  }
815971
public void checkAllThreads() {

        // if nothing is plugged in, exit early
        if (this.monitorPlugin == null) {
            return;
        }

        long currentTime = 0; // lazily initialize current time

        try {
            for (Iterator i = this.threads_.values().iterator(); i.hasNext();) {

                Worker thread = (Worker) i.next();
                synchronized (thread) { // d204471
                    if (thread.getStartTime() > 0) {
                        if (currentTime == 0) {
                            currentTime = System.currentTimeMillis();
                        }

                        if (!thread.isHung && this.monitorPlugin.checkThread(thread, thread.threadNumber, currentTime - thread.getStartTime())) { // PK25446
                            thread.isHung = true;
                        }
                    }
                }
            }

            this.lastThreadCheckDidntComplete = false; // D222794
        } catch (ConcurrentModificationException e) { // begin D222794
            // NOTE: we can pretty much ignore this exception ... if
            // we occasionally fail on the check, we'll be OK. So
            // we simply keep track with a flag. If two consecutive
            // checks fail, then we'll log to FFDC
            if (this.lastThreadCheckDidntComplete) {
                // Alex Ffdc.log(e, this, this.getClass().getName(), "1181", this); //
                // D477704.2
            }
            this.lastThreadCheckDidntComplete = true;
        } // end D222794
    }
579516
protected List<Event> filterEvents(List<Event> toFilter, Long lastIndex) {
		List<Event> events = toFilter;
		if (lastIndex != null) {
			for (int i = 0; i < events.size(); i++) {
				Event event = events.get(i);
				Long eventIndex = event.getWaitIndex();
				if (lastIndex.equals(eventIndex)) {
					events = events.subList(i + 1, events.size());
					break;
				}
			}
		}
		return events;
	}
201947
def elapsed():
    
    environ.abort_thread()
    step = _cd.project.get_internal_project().current_step
    r = _get_report()
    r.append_body(render.elapsed_time(step.elapsed_time))

    result = '[ELAPSED]: {}\n'.format(timedelta(seconds=step.elapsed_time))
    r.stdout_interceptor.write_source(result)
812774
def join_all(joinables, timeout):
    
    started, elapsed = current_millis(), 0
    for ob in joinables:
        ob.join(timeout=timeout / 1000)
        elapsed = current_millis() - started
        timeout = max(0, timeout - elapsed)
781701
public static IntInterval fromTo(int from, int to)
    {
        if (from <= to)
        {
            return IntInterval.fromToBy(from, to, 1);
        }
        return IntInterval.fromToBy(from, to, -1);
    }
974116
public long getElapsedHours() {
		long elapsed;
		if (running) {
			elapsed = (System.nanoTime() - startTime);
		} else {
			elapsed = (stopTime - startTime);
		}
		return elapsed / nsPerHh;
	}
953851
def run_time_or_time_elapsed
      if self.end_time         
         return Time.at(self.end_time - self.start_time)
      else
         return Time.at(Time.now - self.start_time)
      end
    end
758843
public long getElapsedMinutes() {
		long elapsed;
		if (running) {
			elapsed = (System.nanoTime() - startTime);
		} else {
			elapsed = (stopTime - startTime);
		}
		return elapsed / nsPerMm;
	}
688784
private void sendEvents(final List<Event> events) {
        if (null != handlers) {
            for (EventHandler current : handlers) {
                for (Event event : events) {
                    current.handleEvent(event);
                }
            }
        }

        LOG.info("Put events(" + events.size() + ") to Monitoring Server.");

        try {
            if (sendToEventadmin) {
                EventAdminPublisher.publish(events);
            } else {
                monitoringServiceClient.putEvents(events);
            }
        } catch (MonitoringException e) {
            throw e;
        } catch (Exception e) {
            throw new MonitoringException("002",
                                          "Unknown error while execute put events to Monitoring Server", e);
        }

    }
1142381
public void panToTime(long time, long thrid)
	{
		for (Iterator<Long> iter = theTimes.iterator(); iter.hasNext();)
		{
			long theTime = iter.next().longValue();
			if (theTime < time)
				currentTime = theTime;
		}

		folder.setSelection(theOverview.getTabItem());
		updateOverviewPage();
	}
1112881
public SynchronizedCollection<EventListener> getListeners() {
		final Object mutex = mutex();
		synchronized (mutex) {
			return Collections3.synchronizedCollection(this.listeners.values(), mutex);
		}
	}
207411
private void done()
   {
      if (longThreadPool != null && isLong)
      {
         transport.updateLongRunningFree(address,
                                         longThreadPool.getNumberOfFreeThreads() + 1);
      }
      else
      {
         transport.updateShortRunningFree(address,
                                          shortThreadPool.getNumberOfFreeThreads() + 1);
      }
   }
255288
def elapsed(self):
        
        if self.end is None:
            return self() - self.end
        return self.end - self.start
222922
def checkForFinishedThreads(self):
        ''
        for t in self.unfinishedThreads:
            if not t.is_alive():
                t.endTime = time.process_time()
                if getattr(t, 'status', None) is None:
                    t.status = 'ended'