Sets whether or not this widget will be displayed in military time.  When in military time, the hour options
        will go from 01-24, when in normal mode, the hours will go 1-12.

        :param      state   | <bool>
352031
def setMilitaryTime(self, state=True):
        
        time = self.time()

        self._militaryTime = state
        self._hourCombo.clear()

        if state:
            self._timeOfDayCombo.hide()
            self._hourCombo.addItems(['{0:02d}'.format(i+1) for i in xrange(24)])
        else:
            self._timeOfDayCombo.show()
            self._hourCombo.addItems(['{0}'.format(i+1) for i in xrange(12)])

        self.setTime(time)
1154455
function (date) {
            this.minHours = date.getHours();
            this.minMinutes = date.getMinutes();

            // If, for example, min hours are 10, and current hours are 12,
            // update minMinutes to default value, to be able to choose whole range of values
            if (this.d.lastSelectedDate) {
                if (this.d.lastSelectedDate.getHours() > date.getHours()) {
                    this.minMinutes = this.opts.minMinutes;
                }
            }
        }
341585
def check(self):
    

    if self.value is None:
      return True
    return (time.clock() - self.start) >= self.value
1371726
def set_updated_at
      if Dynamoid::Config.timestamps && !updated_at_changed?
        self.updated_at = DateTime.now.in_time_zone(Time.zone)
      end
    end
810528
def set_transition_time(self, transition_time):
        """"""
        command = {
            ATTR_START_ACTION: {
                    ATTR_DEVICE_STATE: self.state,
                    ROOT_START_ACTION: [{
                        ATTR_ID: self.raw[ATTR_ID],
                        ATTR_LIGHT_DIMMER: self.raw[ATTR_LIGHT_DIMMER],
                        ATTR_TRANSITION_TIME: transition_time * 10 * 60
                    }, self.devices_dict]
                }
            }
        return self.set_values(command)
490543
def setLocked( self, state = True ):
        
        self._xLocked = state
        self._yLocked = state
842275
def set_schedule_enabled(self, state):
        
        desired_state = {"schedule_enabled": state}

        response = self.api_interface.set_device_state(self, {
            "desired_state": desired_state
        })

        self._update_state_from_response(response)
420510
public void toggleState()
    {
        if (m_iCurrentState == ON)
            m_iCurrentState = NULL;
        else if (m_iCurrentState == OFF)
            m_iCurrentState = ON;
        else
            m_iCurrentState = OFF;
        this.updateImage();
    }
309006
def set_armed_state(self, state):
        """"""
        self.set_service_value(
            self.security_sensor_service,
            'Armed',
            'newArmedValue',
            state)
        self.set_cache_value('Armed', state)
732003
private Period setTimeUnitValue(TimeUnit unit, float value) {
    if (value < 0) {
      throw new IllegalArgumentException("value: " + value);
    }
    return setTimeUnitInternalValue(unit, (int)(value * 1000) + 1);
  }
185373
def set_state(self, state):
        
        values = {"desired_state": {"locked": state}}
        response = self.api_interface.local_set_state(self, values)
        self._update_state_from_response(response)
1319222
def is_switched_on(self, refresh=False):
        
        if refresh:
            self.refresh()
        val = self.get_value('Armed')
        return val == '1'
290349
def current_time(self, date):
        
        ret = self.command(
            'global.cgi?action=setCurrentTime&time={0}'.format(date)
        )

        if "ok" in ret.content.decode('utf-8').lower():
            return True

        return False
352870
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = DBConstants.NORMAL_RETURN;
        if (bState)      // Only if turned ON (can't turn a radio button off!)
        {
            if (m_objTarget instanceof String)
            {
                if (m_bTrueIfMatch)
                    iErrorCode = this.setString((String)m_objTarget, bDisplayOption, iMoveMode);
                else
                {
                    String thisString = this.getString();
                    if (m_objTarget.equals(thisString)) // If == target, clear
                        iErrorCode = this.setString(Constants.BLANK, bDisplayOption, iMoveMode);
                }
            }
            else
            {
                if (m_bTrueIfMatch)
                    iErrorCode = this.setData(m_objTarget, bDisplayOption, iMoveMode);
                else
                {
                    Object thisString = this.getData();
                    if (m_objTarget.equals(thisString)) // If == target, clear
                        iErrorCode = this.setData(null, bDisplayOption, iMoveMode);
                }
            }
        }
        return iErrorCode;
    }
472667
def set_timing(self, timing: bool, reset: bool = False) -> None:
        
        self._timing = timing
        if reset:
            self.reset()
988688
protected final synchronized void setState(int newState)
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && // d527372
            TEBeanLifeCycleInfo.isTraceEnabled())
            TEBeanLifeCycleInfo.traceBeanState(state, getStateName(state), newState,
                                               getStateName(newState)); // d167264

        state = newState;
    }
1228284
public void setHour(int hour){
        if(m24Hour)
            hour = Math.max(hour, 0) % 24;
        else
            hour = Math.max(hour, 0) % 12;

        if(mHour != hour){
            int old = mHour;
            mHour = hour;

            if(mOnTimeChangedListener != null)
                mOnTimeChangedListener.onHourChanged(old, mHour);

            if(mMode == MODE_HOUR)
                invalidate();
        }
    }