Performs a pause.

@param pause pause duration, in milliseconds.
@return A self reference.
163090
public Actions pause(long pause) {
    if (isBuildingActions()) {
      action.addAction(new PauseAction(pause));
    }

    return tick(new Pause(defaultMouse, Duration.ofMillis(pause)));
  }
695274
public static PauseStatus determinePauseStatus(TransferState transferState,
            boolean forceCancel) {

        if (forceCancel) {
            if (transferState == TransferState.Waiting) {
                return PauseStatus.CANCELLED_BEFORE_START;
            } else if (transferState == TransferState.InProgress) {
                return PauseStatus.CANCELLED;
            }
        }
        if (transferState == TransferState.Waiting) {
            return PauseStatus.NOT_STARTED;
        }
        return PauseStatus.NO_EFFECT;
    }
907594
public static Delay constant(Duration delay) {

        LettuceAssert.notNull(delay, "Delay must not be null");
        LettuceAssert.isTrue(delay.toNanos() >= 0, "Delay must be greater or equal to 0");

        return new ConstantDelay(delay);
    }
344946
def _get_pause(jid, state_id=None):
    '''
    
    '''
    pause_dir = os.path.join(__opts__['cachedir'], 'state_pause')
    pause_path = os.path.join(pause_dir, jid)
    if not os.path.exists(pause_dir):
        try:
            os.makedirs(pause_dir)
        except OSError:
            # File created in the gap
            pass
    data = {}
    if state_id is not None:
        if state_id not in data:
            data[state_id] = {}
    if os.path.exists(pause_path):
        with salt.utils.files.fopen(pause_path, 'rb') as fp_:
            data = salt.utils.msgpack.loads(fp_.read())
    return data, pause_path
890499
public T pauseBeforeReconnectInSeconds(int reconnectInSecond) {
        this.reconnectTimeoutInMilliseconds = (int)TimeUnit.SECONDS.toMillis(reconnectInSecond);
        return derived.cast(this);
    }
45838
def pause(self, length=None, **kwargs):
        
        return self.nest(Pause(length=length, **kwargs))
80298
public Subscription pause( Subscription subscription ) {
    ParameterMap<String, String> params = new ParameterMap<String, String>();
    params.add( "pause", String.valueOf( true ) );
    return RestfulUtils.update( SubscriptionService.PATH, subscription, params, false, Subscription.class, super.httpClient );
  }
78098
@CheckForNull
    public static TimeDuration fromString(@CheckForNull String delay) {
        if (delay == null) {
            return null;
        }

        long unitMultiplier = 1L;
        delay = delay.trim();
        try {
            // TODO: more unit handling
            if (delay.endsWith("sec") || delay.endsWith("secs")) {
                delay = delay.substring(0, delay.lastIndexOf("sec"));
                delay = delay.trim();
                unitMultiplier = 1000L;
            }
            return new TimeDuration(Long.parseLong(delay.trim()) * unitMultiplier);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException("Invalid time duration value: "+delay);
        }
    }
1191586
public PauseAppStreamResponse pauseAppStream(String app, String stream) {
        PauseAppStreamRequest pauseAppStreamRequest = new PauseAppStreamRequest();
        pauseAppStreamRequest.setApp(app);
        pauseAppStreamRequest.setStream(stream);
        return pauseAppStream(pauseAppStreamRequest);
    }
721718
def handle_pause(self):
        """"""
        flag = self.reader.byte()
        if flag > 0:
            logger.info(" -> pause: on")
            self.controller.playing = False
        else:
            logger.info(" -> pause: off")
            self.controller.playing = True
190513
async def jsk_vc_pause(self, ctx: commands.Context):
        

        voice = ctx.guild.voice_client

        if voice.is_paused():
            return await ctx.send("Audio is already paused.")

        voice.pause()
        await ctx.send(f"Paused audio in {voice.channel.name}.")
6659
public void pause() {
        if (hasState(TICKING) && !hasState(PAUSED)) {
            if (DBG) Log.v(TAG, "pause. " + mEntries.size());
            mContentView.animate().cancel();
            addState(PAUSED);
            cancel(-1);
        }
    }
495863
public void pause(int position) throws IllegalStateException {
        // allow pause if playing or stopped
        switch (subscriberStream.getState()) {
            case PLAYING:
            case STOPPED:
                subscriberStream.setState(StreamState.PAUSED);
                clearWaitJobs();
                sendPauseStatus(currentItem.get());
                sendClearPing();
                subscriberStream.onChange(StreamState.PAUSED, currentItem.get(), position);
                break;
            default:
                throw new IllegalStateException("Cannot pause in current state");
        }
    }
919999
protected String pauseMsg() throws IOException {
        final WorkerStatus status = new WorkerStatus();
        status.setRunAt(new Date());
        status.setPaused(isPaused());
        return ObjectMapperFactory.get().writeValueAsString(status);
    }
826576
@Override
    public PersistableDownload pause() throws PauseException {
        boolean forceCancel = true;
        TransferState currentState = getState();
        this.monitor.getFuture().cancel(true);

        if (persistableDownload == null) {
            throw new PauseException(TransferManagerUtils.determinePauseStatus(
                    currentState, forceCancel));
        }
        return persistableDownload;
    }
1244020
public static void pause(Context context, String clientId) {
        Intent intent = new Intent(context, PlaybackService.class);
        intent.setAction(ACTION_PAUSE_PLAYER);
        intent.putExtra(BUNDLE_KEY_SOUND_CLOUD_CLIENT_ID, clientId);
        context.startService(intent);
    }
490606
public void setPaused(boolean paused, CmsEntity entity) {

        if (paused != m_paused) {
            m_paused = paused;
            if (m_paused) {
                if (m_validationTimer != null) {
                    m_validationTimer.cancel();
                    m_validationTimer = null;
                }
            } else {
                m_validationTimer = new ValidationTimer(entity);
                m_validationTimer.schedule(300);
            }

        }
    }