called by modifed call from translation time evaluator
174582
public static boolean call(PageContext pc, String str) {

	try {
	    return pc.evaluate(str) == null;
	}
	catch (PageException e) {
	    return true;
	}
    }
409851
def timeit(method):
    """"""

    import datetime

    @functools.wraps(method)
    def timed_method(self, rinput):

        time_start = datetime.datetime.utcnow()
        result = method(self, rinput)
        time_end = datetime.datetime.utcnow()
        result.time_it(time_start, time_end)
        self.logger.info('total time measured')
        return result

    return timed_method
227614
def timeit(metric, func, *args, **kwargs):
    
    return _client.timeit(metric, func, *args, **kwargs)
695006
private void checkLocaleChange(Context context) {
        if (!isCurrentLanguageSetting(context, currentLanguage)) {
            sendOnBeforeLocaleChangedEvent();
            isLocalizationChanged = true;
            callDummyActivity();
            activity.recreate();
        }
    }
830133
function _runEval(config, parser, options, sync=true) {
  const time = process.hrtime();
  const evalEvent = new emitter.Evaluate({
    target:config.filename,
    source:(config.parent || {}).filename,
    moduleConfig: config,
    parserOptions: options,
    sync
  });

  const evaluateEvent = emitter.emit('evaluate', evalEvent);

  function evaluated() {
    let module = ((evalEvent.data.module) ? evalEvent.data.module : parser.bind(settings)(config, options));
    if (!module || !module.loaded) return module;
    const evaluatedEvent =  emitter.emit('evaluated', new emitter.Evaluated({
      target:module.filename,
      source:(module.parent || {}).filename,
      duration:process.hrtime(time),
      cacheSize: cache.size,
      exports: module.exports,
      sync
    }));
    try {filePaths.set(module.exports, module.filename);} catch(err) {}

    return sync?module:evaluatedEvent.then(()=>module);
  }

  return sync?evaluated():evaluateEvent.then(evaluated);
}
1102080
public void updateLocalizationDefinition(
                                             LocalizationDefinition newLocalizationDefinition)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "updateLocalizationDefinition", newLocalizationDefinition);

        // If null is passed as the new localization definition, treat that
        // as a no-op.
        if (null != newLocalizationDefinition)
        {
            boolean isDestLimitsChanged = false;
            boolean isSendAllowedChanged = false;
            boolean isAlterationTimeChanged = false;
            boolean isNameChanged = false;

            // If the previous definition we had was null, then every attribute is
            // changing, as it's being set for the 1st time.
            if (null == _lastLocalizationDefinitionSetByAdmin)
            {
                isDestLimitsChanged = true;
                isSendAllowedChanged = true;
                isAlterationTimeChanged = true;
                isNameChanged = true;
            }
            else
            {
                // Check to see if the max messages property has changed.
                if ((_lastLocalizationDefinitionSetByAdmin.getDestinationHighMsgs() !=
                    newLocalizationDefinition.getDestinationHighMsgs())
                    || (_lastLocalizationDefinitionSetByAdmin.getDestinationLowMsgs() !=
                    newLocalizationDefinition.getDestinationLowMsgs()))
                {
                    isDestLimitsChanged = true;
                }

                // Check to see if put inhibited changed or not.
                if (_lastLocalizationDefinitionSetByAdmin.isSendAllowed() != newLocalizationDefinition.isSendAllowed())
                {
                    isSendAllowedChanged = true;
                }

                // Check to see if the alteration time has changed.
                if (_lastLocalizationDefinitionSetByAdmin.getAlterationTime() != newLocalizationDefinition.getAlterationTime())
                {
                    isAlterationTimeChanged = true;
                }

                // Check to see if the name has changed or not.
                String oldName = _lastLocalizationDefinitionSetByAdmin.getName();
                String newName = newLocalizationDefinition.getName();
                if ((null == newName && oldName != null)
                    || (null != newName && oldName == null))
                {
                    isNameChanged = true;
                }
            }

            // Take a snap-shot so we can compare the settings we've got with the
            // ones admin gives us next time.
            this._lastLocalizationDefinitionSetByAdmin =
                            newLocalizationDefinition;

            if (isDestLimitsChanged)
            {
                setDestLimits(newLocalizationDefinition.getDestinationHighMsgs(),
                              newLocalizationDefinition.getDestinationLowMsgs());
            }
            if (isSendAllowedChanged)
            {
                setSendAllowed(newLocalizationDefinition.isSendAllowed());
            }
            if (isAlterationTimeChanged)
            {
                setAlterationTime(newLocalizationDefinition.getAlterationTime());
            }
            if (isNameChanged)
            {
                setName(newLocalizationDefinition.getName());
            }

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "updateLocalizationDefinition");
    }
1251506
def _evalDayStr(self, datetimeString, sourceTime):
        
        s = datetimeString.strip()
        sourceTime = self._evalDT(datetimeString, sourceTime)

        # Given string is a natural language date string like today, tomorrow..
        (yr, mth, dy, hr, mn, sec, wd, yd, isdst) = sourceTime

        try:
            offset = self.ptc.dayOffsets[s]
        except KeyError:
            offset = 0

        if self.ptc.StartTimeFromSourceTime:
            startHour = hr
            startMinute = mn
            startSecond = sec
        else:
            startHour = 9
            startMinute = 0
            startSecond = 0

        self.currentContext.updateAccuracy(pdtContext.ACU_DAY)
        start = datetime.datetime(yr, mth, dy, startHour,
                                  startMinute, startSecond)
        target = start + datetime.timedelta(days=offset)
        return target.timetuple()
67813
def _evalTimeStr(self, datetimeString, sourceTime):
        
        s = datetimeString.strip()
        sourceTime = self._evalDT(datetimeString, sourceTime)

        if s in self.ptc.re_values['now']:
            self.currentContext.updateAccuracy(pdtContext.ACU_NOW)
        else:
            # Given string is a natural language time string like
            # lunch, midnight, etc
            sTime = self.ptc.getSource(s, sourceTime)
            if sTime:
                sourceTime = sTime
            self.currentContext.updateAccuracy(pdtContext.ACU_HALFDAY)

        return sourceTime
905388
def time_annotated(func, *args, **kwargs):
    
    start = time()
    result = func(*args, **kwargs)
    end = time()
    result.time = round(end - start, config.PRECISION)
    return result
997742
function getTimeIncreaseFromName(methodName) {
  const matchNumbers = String(methodName).match(/_increaseTimeBy(\d+)/);

  if (matchNumbers !== null
    && typeof matchNumbers[1] === 'string') {
    return parseInt(matchNumbers[1], 10);
  }

  return 0;
}
1288158
public static void checkIfModifiedSince(final String method, final String ifModifiedSince,
            final Instant modified) {
        if (isGetOrHead(method)) {
            final Instant time = parseDate(ifModifiedSince);
            if (time != null && time.isAfter(modified.truncatedTo(SECONDS))) {
                throw new RedirectionException(notModified().build());
            }
        }
    }
1114662
function translateDateTimestamp(timestamp) {
    if (!timestamp) {
        LOG.warn("Received an invalid timestamp: {}", timestamp);
        return Date.now();
    }

    return new Date(timestamp);
}
818950
function invokeDebounced(vContext, vArguments) {
				cancelTimer();

				/**
				 * Executes a trailing invocation if it is enabled in the options.
				 *
				 * @param {boolean} [bFinal=true] Whether this is the final invocation.
				 */
				function _invoke(bFinal) {
					bFinal = bFinal !== false;
					if (bFinal) {
						cancel();
					}
					if (mOptions.trailing) {
						invoke(vContext, vArguments, null, bFinal);
					}
				}

				if (mOptions.requestAnimationFrame) {
					iTimerId = window.requestAnimationFrame(function() {
						_invoke();
					});
				} else {
					var iNow = Date.now();
					var iTimeSinceLastInvocation = iLastInvocationTime == null ? 0 : iNow - iLastInvocationTime;
					var iRemainingWaitTime = Math.max(0, bMaxWait ?
														 Math.min(mOptions.maxWait - iTimeSinceLastInvocation, mOptions.wait) :
														 mOptions.wait);
					var bMaxWaitInvocation = iRemainingWaitTime < mOptions.wait;

					iTimerId = setTimeout(function() {
						if (bMaxWaitInvocation) {
							var iTimerOvertime = Math.max(0, (Date.now() - iNow) - iRemainingWaitTime);
							var iCancelWaitTime = mOptions.wait - iRemainingWaitTime;
							if (iTimerOvertime > iCancelWaitTime) {
								// The timer took longer, maybe because of a long-running synchronous execution. No need to wait more.
								_invoke();
							} else {
								// Because there is some time left, the timer is restarted for cleanup. This is necessary for correct scheduling if
								// the debounced method is called again during this time.
								iTimerId = setTimeout(cancel, iCancelWaitTime - iTimerOvertime);
								_invoke(false);
							}
						} else {
							_invoke();
						}
					}, iRemainingWaitTime);
				}
			}
1102661
function decodeRangeTime(map, timeStr){
  let times = timeStr.split('-');

  times[0] = Number(times[0]);
  times[1] = Number(times[1]);
  if(times[0] > times[1]){
    console.log("Error time range");
    return null;
  }

  for(let i = times[0]; i <= times[1]; i++){
    map[i] = i;
  }
}
54291
public void addTranslationDTO(String locale, String value, boolean outdated, boolean approximate) {
        translations.add(new TranslationDTO(locale, value, outdated, approximate));
    }
298881
def call ( severity, time, progname, msg )
      msg = Format % [format_datetime(time), severity, $$, progname, msg2str(msg)]
      msg = @@colors[severity] + msg + @@colors['DEFAULT'] if @@colorize
      msg << "\n"
    end
649920
private void performPostCompilationTasksInternal() {
    if (options.devMode == DevMode.START_AND_END) {
      runValidityCheck();
    }
    setProgress(1.0, "recordFunctionInformation");

    if (tracker != null) {
      tracker.outputTracerReport();
    }
  }