/*
(non-Javadoc)
@see javax.servlet.sip.SipApplicationSession#getTimers()
433194
public Collection<ServletTimer> getTimers() {
		if(!isValid()) {
			throw new IllegalStateException("SipApplicationSession already invalidated !");
		}
		if(servletTimers != null) {
			return servletTimers.values();
		}
		return new HashMap<String, ServletTimer>().values();
	}
427064
function getEvents(duration){

    if (positionCallback == null){
        return [];
    }

    currentPosition = positionCallback();

    if (!currentPosition){

        return [];
        
    }

    const extra = {
        'ik': ['Time'],
        'iv': [utils.getDataPointDuration(duration)],
        'fk': [],
        'fv': []
    };

    return [['vadrPosition', currentPosition, extra]];

}
908426
@Nonnull
    private Timer getTimer() {
        return timerReference.updateAndGet(timer -> timer == null ? new Timer(LogConfigurationTask.class.getSimpleName(), true) : timer);
    }
843889
public List<INextGenEvent> getEvents(Long startTime) {
		ArrayList<INextGenEvent> eventList = null;
		
		//Key events where key is equal to or greater (null if nothing is found)
		Long eventKey = events.ceilingKey(startTime); 
		
	    if(eventKey != null) {
	    	eventList = events.get(eventKey);
	    	currentEventTime = eventKey;
	    } 		
		return eventList;
	}
94837
@Override
  public SortedMap<String, Timer> getTimers(MetricFilter filter) {
    return getSimplyNamedMetrics(Timer.class, Optional.of(filter));
  }
836646
public function getActiveTimers()
    {
        $result = $this->getActiveUsers( );
        if ( $result->isSuccess() ) {
            $data = array();
            foreach ($result->data as $user) {
                $subResult = $this->getUserEntries( $user->id, Range::today( $this->_timeZone ) );
                if ( $subResult->isSuccess() ) {
                    foreach ($subResult->data as $entry) {
                        if ($entry->timer_started_at != null || $entry->timer_started_at != "") {
                            $data[$user->id] = $entry;
                            break;
                        }
                    }
                }
            }
            $result->data = $data;
        }

        return $result;
    }
911737
private TimerTask getTimerTask() {
    final TimeBasedReportingMetric<T> lockObject = this;
    final TimerTask recurringReporting = new TimerTask() {
      @Override
      public void run() {
        synchronized (lockObject) {
          preTrackingEventMethod();
          notifyManager();
          postTrackingEventMethod();
        }
      }
    };
    return recurringReporting;
  }
396465
function getInstanceTimer (
  instanceId,
  moduleGetter
) {
  var instance = instanceOptions[instanceId];
  var timer = moduleGetter('timer');
  var timerAPIs = {
    setTimeout: function () {
      var args = [], len = arguments.length;
      while ( len-- ) args[ len ] = arguments[ len ];

      var handler = function () {
        args[0].apply(args, args.slice(2));
      };

      timer.setTimeout(handler, args[1]);
      return instance.document.taskCenter.callbackManager.lastCallbackId.toString()
    },
    setInterval: function () {
      var args = [], len = arguments.length;
      while ( len-- ) args[ len ] = arguments[ len ];

      var handler = function () {
        args[0].apply(args, args.slice(2));
      };

      timer.setInterval(handler, args[1]);
      return instance.document.taskCenter.callbackManager.lastCallbackId.toString()
    },
    clearTimeout: function (n) {
      timer.clearTimeout(n);
    },
    clearInterval: function (n) {
      timer.clearInterval(n);
    }
  };
  return timerAPIs
}
438738
@Nullable
    public static ClientConnectionTimings get(RequestContext ctx) {
        requireNonNull(ctx, "ctx");
        if (ctx.hasAttr(TIMINGS)) {
            return ctx.attr(TIMINGS).get();
        }
        return null;
    }
295693
public final Long getExpiresInSeconds() {
    lock.lock();
    try {
      if (expirationTimeMilliseconds == null) {
        return null;
      }
      return (expirationTimeMilliseconds - clock.currentTimeMillis()) / 1000;
    } finally {
      lock.unlock();
    }
  }
548032
@Deprecated
  @SuppressWarnings({"deprecation"})
  public TimedEvents<io.opencensus.trace.NetworkEvent> getNetworkEvents() {
    TimedEvents<MessageEvent> timedEvents = getMessageEvents();
    List<TimedEvent<io.opencensus.trace.NetworkEvent>> networkEventsList =
        new ArrayList<TimedEvent<io.opencensus.trace.NetworkEvent>>();
    for (TimedEvent<MessageEvent> timedEvent : timedEvents.getEvents()) {
      networkEventsList.add(
          TimedEvent.<io.opencensus.trace.NetworkEvent>create(
              timedEvent.getTimestamp(),
              BaseMessageEventUtils.asNetworkEvent(timedEvent.getEvent())));
    }
    return TimedEvents.<io.opencensus.trace.NetworkEvent>create(
        networkEventsList, timedEvents.getDroppedEventsCount());
  }
1051982
public Iterator<?> getSessions(String protocol) {
		if(!isValid()) {
			throw new IllegalStateException("SipApplicationSession already invalidated !");
		}
		if(protocol == null) {
			throw new NullPointerException("protocol given in argument is null");
		}
		if("SIP".equalsIgnoreCase(protocol)) {
			return getSipSessions(false).iterator();
		} else if("HTTP".equalsIgnoreCase(protocol)) {
			return getHttpSessions().iterator();
		} else {
			throw new IllegalArgumentException(protocol + " sessions are not handled by this container");
		}
	}
565298
private Metric collectTimer(String dropwizardName, Timer timer) {
    String metricName = DropWizardUtils.generateFullMetricName(dropwizardName, "timer");
    String metricDescription = DropWizardUtils.generateFullMetricDescription(dropwizardName, timer);
    return collectSnapshotAndCount(
        metricName, metricDescription, NS_UNIT, timer.getSnapshot(), timer.getCount());
  }
402512
MetricFamilySamples fromTimer(String dropwizardName, Timer timer) {
        return fromSnapshotAndCount(dropwizardName, timer.getSnapshot(), timer.getCount(),
                1.0D / TimeUnit.SECONDS.toNanos(1L), getHelpMessage(dropwizardName, timer));
    }
1058890
public void getTimeOid (ClientObject source, String timeBase,
                            TimeBaseService.GotTimeBaseListener listener)
        throws InvocationException
    {
        // look up the time base object in question
        TimeBaseObject time = getTimeBase(timeBase);
        if (time == null) {
            throw new InvocationException(NO_SUCH_TIME_BASE);
        }
        // and send the response
        listener.gotTimeOid(time.getOid());
    }
624889
public synchronized void onTimer() {
        CruiseConfig currentConfig = applicationContext.getBean(CruiseConfigProvider.class).getCurrentConfig();
        purgeStaleHealthMessages(currentConfig);
        LOG.debug("Recomputing material to pipeline mappings.");

        HashMap<ServerHealthState, Set<String>> erroredPipelines = new HashMap<>();

        for (Map.Entry<HealthStateType, ServerHealthState> entry : serverHealth.entrySet()) {
            erroredPipelines.put(entry.getValue(), entry.getValue().getPipelineNames(currentConfig));
        }
        pipelinesWithErrors = erroredPipelines;
        LOG.debug("Done recomputing material to pipeline mappings.");
    }
1360398
public int[] getFrameTimeStampsFromDurations(int[] frameDurationsMs) {
    int[] frameTimestampsMs = new int[frameDurationsMs.length];
    int accumulatedDurationMs = 0;
    for (int i = 0; i < frameDurationsMs.length; i++) {
      frameTimestampsMs[i] = accumulatedDurationMs;
      accumulatedDurationMs += frameDurationsMs[i];
    }
    return frameTimestampsMs;
  }