list of timers in use Returns default params, overrides if provided with values
324689
function parseParameters(options) {
    var opt = {
        maximumAge: 0,
        enableHighAccuracy: false,
        timeout: Infinity
    };

    if (options) {
        if (options.maximumAge !== undefined && !isNaN(options.maximumAge) && options.maximumAge > 0) {
            opt.maximumAge = options.maximumAge;
        }
        if (options.enableHighAccuracy !== undefined) {
            opt.enableHighAccuracy = options.enableHighAccuracy;
        }
        if (options.timeout !== undefined && !isNaN(options.timeout)) {
            if (options.timeout < 0) {
                opt.timeout = 0;
            } else {
                opt.timeout = options.timeout;
            }
        }
    }

    return opt;
}
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
}
354323
async function fetchParams(conf) {
  await util.wait(100)  
  return { 
    Parameters: [ 
      {
        Name: "VARIABLE_A",
        Type: "String",
        Value: "value-a"
      },
      {
        Name: "VARIABLE_B",
        Type: "String",
        Value: "value-b"
      }
    ]
  }
}
1022785
def options(self, parser, env=os.environ):
        """"""
        super(TimerPlugin, self).options(parser, env)

        # timer top n
        parser.add_option(
            "--timer-top-n",
            action="store",
            default="-1",
            dest="timer_top_n",
            help=(
                "When the timer plugin is enabled, only show the N tests that "
                "consume more time. The default, -1, shows all tests."
            ),
        )

        parser.add_option(
            "--timer-json-file",
            action="store",
            default=None,
            dest="json_file",
            help=(
                "Save the results of the timing and status of each tests in "
                "said Json file."
            ),
        )

        _time_units_help = ("Default time unit is a second, but you can set "
                            "it explicitly (e.g. 1s, 500ms)")

        # timer ok
        parser.add_option(
            "--timer-ok",
            action="store",
            default=1,
            dest="timer_ok",
            help=(
                "Normal execution time. Such tests will be highlighted in "
                "green. {units_help}.".format(units_help=_time_units_help)
            ),
        )

        # time warning
        parser.add_option(
            "--timer-warning",
            action="store",
            default=3,
            dest="timer_warning",
            help=(
                "Warning about execution time to highlight slow tests in "
                "yellow. Tests which take more time will be highlighted in "
                "red. {units_help}.".format(units_help=_time_units_help)
            ),
        )

        # Windows + nosetests does not support colors (even with colorama).
        if not IS_NT:
            parser.add_option(
                "--timer-no-color",
                action="store_true",
                default=False,
                dest="timer_no_color",
                help="Don't colorize output (useful for non-tty output).",
            )

        # timer filter
        parser.add_option(
            "--timer-filter",
            action="store",
            default=None,
            dest="timer_filter",
            help="Show filtered results only (ok,warning,error).",
        )

        # timer fail
        parser.add_option(
            "--timer-fail",
            action="store",
            default=None,
            dest="timer_fail",
            choices=('warning', 'error'),
            help="Fail tests that exceed a threshold (warning,error)",
        )
373654
def params_values(self):
        
        return [p.value for p in atleast_list(self.params) if p.has_value]
1045238
def _get_all_timers(self, dataframe):
        
        s = dataframe['custom_timers'].apply(json.loads)
        s.index = dataframe['epoch']
        for index, value in s.iteritems():
            if not value:
                continue
            for key, value in six.iteritems(value):
                self._timers_values[key].append((index, value))
                self.total_timers += 1
        del dataframe['custom_timers']
        del s
913983
def _check_params(self,params):
        
        overridden_object_params = list(self._overridden.param)
        for item in params:
            if item not in overridden_object_params:
                self.param.warning("'%s' will be ignored (not a Parameter).",item)
184950
def get_listeners(self, event_type: str) -> List[Callable]:
        """"""
        if event_type not in self.events:
            raise ValueError(f'No event {event_type} in system.')
        return self.events.get_listeners(event_type)
1054492
def getParams(options=None):
    
    result = []
    if options:
        members = options.__dict__
        for k, v in sorted(members.items()):
            result.append("# %-40s: %s" % (k, str(v)))
    else:
        vars = inspect.currentframe().f_back.f_locals
        for var in filter(lambda x: re.match("param_", x), vars.keys()):
            result.append("# %-40s: %s" %
                          (var, str(vars[var])))

    if result:
        return "\n".join(result)
    else:
        return "# no parameters."
657090
def trigger(self_, *param_names):
        
        events = self_.self_or_cls.param._events
        watchers = self_.self_or_cls.param._watchers
        self_.self_or_cls.param._events  = []
        self_.self_or_cls.param._watchers = []
        param_values = dict(self_.get_param_values())
        params = {name: param_values[name] for name in param_names}
        self_.self_or_cls.param._TRIGGER = True
        self_.set_param(**params)
        self_.self_or_cls.param._TRIGGER = False
        self_.self_or_cls.param._events = events
        self_.self_or_cls.param._watchers = watchers
393119
def get_params(self):
        
        assert self.binded and self.params_initialized

        if self._params_dirty:
            self._sync_params_from_devices()
        return (self._arg_params, self._aux_params)
1363898
def return_timer(self, name, status, timer):
      '''  '''
      timer_template = '%s  %s  %s : %s : %9s'
      t = str(timedelta(0, timer)).split(',')[-1].strip().split(':')
      #t = str(timedelta(0, timer)).split(':')
      if len(t) == 4:
         h, m, s = int(t[0])*24 + int(t[1]), int(t[2]), float(t[3])
      elif len(t) == 3: h, m, s = int(t[0]), int(t[1]), float(t[2])
      else: h, m, s = 0, 0, str(t)
      return timer_template%(
         name[:20].ljust(20),
         status[:7].ljust(7),
         '%3d'%h if h != 0 else ' --',
         '%2d'%m if m != 0 else '--',
         '%.6f'%s if isinstance(s, float) else s
      )
782338
def _system_parameters(**kwargs):
    
    return {key: value for key, value in kwargs.items()
            if (value is not None or value == {})}
893110
def get_params(self):
        
        return self.timeout, self.xonxoff, self.rtscts, self.baudrate
478228
def get_params(self):
        
        params = {}
        complex = False

        for name, opt in self.filter_options.items():
            if opt.ignored:
                continue
            if self.set_param(params, name):
                complex = True
        return params, complex
440152
private boolean hasTimeoutCallbackParameters(MethodMap.MethodInfo methodInfo) {
        int numParams = methodInfo.getNumParameters();
        return numParams == 0 ||
               (numParams == 1 && methodInfo.getParameterType(0) == Timer.class);
    }
1084118
def schedule_timers(timers)

      timers.each do |t|

        after, action = if t.is_a?(String)
          i = t.rindex(':')
          [ t[0..i - 1], t[i + 1..-1] ]
        else
          t
        end

        after = after.strip
        action = action.strip

        next if after == ''

        msg = case action

          when 'timeout', 'undo', 'pass'

            { 'action' => 'cancel',
              'fei' => h.fei,
              'flavour' => action == 'timeout' ? 'timeout' : nil }

          when 'redo', 'retry'

            { 'action' => 'cancel',
              'fei' => h.fei,
              're_apply' => true }

          when /^err(or)?( *.+)?$/

            message = if $~[2]
              $~[2].to_s.strip
            else
              "timer induced error (\"#{after}: #{action}\")"
            end

            { 'action' => 'cancel',
              'fei' => h.fei,
              're_apply' => { 'tree' => [ 'error', { message => nil }, [] ] } }

          when CommandExpression::REGEXP

            { 'action' => 'cancel',
              'fei' => h.fei,
              're_apply' => {
                'tree' => [
                  $~[1], { $~[2].split(' ').last.to_s => nil }, [] ] } }

          else

            { 'action' => 'apply',
              'wfid' => h.fei['wfid'],
              'expid' => h.fei['expid'],
              'parent_id' => h.fei,
              'flanking' => true,
              'tree' => [ action, {}, [] ],
              'workitem' => h.applied_workitem }
        end

        (h.timers ||= []) <<
          [ @context.storage.put_schedule('at', h.fei, after, msg), action ]
      end
    end