Sets the given ReadWritableDuration to zero milliseconds.

@param duration duration to get modified
@param object  the object to convert, which is null
@param chrono  the chronology to use
@throws NullPointerException if the duration is null
516346
public void setInto(ReadWritablePeriod duration, Object object, Chronology chrono) {
        duration.setPeriod((Period) null);
    }
1364244
public void setDuration(int index, Duration value)
   {
      set(selectField(ResourceFieldLists.CUSTOM_DURATION, index), value);
   }
1220860
public void onSuccessfulWrite(long startTimeNanos) {
    Instrumented.updateTimer(this.dataWriterTimer, System.nanoTime() - startTimeNanos, TimeUnit.NANOSECONDS);
    Instrumented.markMeter(this.successfulWritesMeter);
  }
17118
public void setStarttime(Object starttime) throws PageException {
	if (StringUtil.isEmpty(starttime)) return;
	this.starttime = DateCaster.toTime(pageContext.getTimeZone(), starttime);
    }
1073336
private void setInactivityTimer(long ms) {
        if (sessionInactivityTimer == null) {
            sessionInactivityTimer = new SessionInactivityTimer(sessionHandler.getScheduler(), this);
        }
        sessionInactivityTimer.setIdleTimeout(ms);
    }
403114
void setDuration(int seconds, int page) {
        PdfDictionary pg = reader.getPageN(page);
        if (seconds < 0)
            pg.remove(PdfName.DUR);
        else
            pg.put(PdfName.DUR, new PdfNumber(seconds));
        markUsed(pg);
    }
204169
@Override
    public final void setTimeToLive(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setTimeToLive", Long.valueOf(value));
        if ((value >= MfpConstants.MIN_TIME_TO_LIVE) && (value <= MfpConstants.MAX_TIME_TO_LIVE)) {
            super.setTimeToLive(value);
        }
        else {
            IllegalArgumentException e = new IllegalArgumentException(Long.toString(value));
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "setTimeToLive", e);
            throw e;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setTimeToLive");
    }
1180981
public void setDuration(Duration duration, Related related) {
		this.date = null;
		this.duration = duration;
		setRelated(related);
	}
566070
@JsonProperty("duration")
    public Long getDuration() {
        if (start != null && end != null) {
            return start.until(end, ChronoUnit.MILLIS);
        } else {
            return null;
        }
    }
617949
public void setDuration(@NotNull final Duration duration) {
        if (duration.compareTo(MAXIMUM_DURATION) > 0) {
            throw new IllegalArgumentException("The duaration has to be smaller than 23:59:59.");
        }
        super.setValue(durationToDate(duration));
    }
215042
private void writeDuration(long beginTime) throws XMLStreamException {
        xmlStreamWriter.writeStartElement("duration");
        xmlStreamWriter.writeCharacters(Long.toString(System.currentTimeMillis() - beginTime));
        xmlStreamWriter.writeEndElement(); // duration
    }
289662
public final void setDuration(int duration) {
        if (isComplete()) {
            this.getLogger()
                    .warn(
                            "{} is already closed, the new duration of {} will be ignored on: {}",
                            this.getClass().getSimpleName(),
                            duration,
                            this);
            return;
        }
        this.duration = duration;
    }
1098340
public void setHideTime(boolean enable, final boolean useDarkTheme) {
        if(enable && !shouldHideTime) {
            // hide the time spinner and show a button to show it instead
            timeSpinner.setVisibility(GONE);
            ImageButton timeButton = (ImageButton) LayoutInflater.from(getContext()).inflate(R.layout.time_button, null);
            timeButton.setImageResource(useDarkTheme ? R.drawable.ic_action_time_dark : R.drawable.ic_action_time_light);
            timeButton.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    setHideTime(false, useDarkTheme);
                }
            });
            this.addView(timeButton);
        } else if(!enable && shouldHideTime) {
            timeSpinner.setVisibility(VISIBLE);
            this.removeViewAt(2);
        }
        shouldHideTime = enable;
    }
858228
private void initDurationPanel() {

        m_durationPrefixLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_DURATION_PREFIX_0));
        m_durationAfterPostfixLabel.setText(Messages.get().key(Messages.GUI_SERIALDATE_DURATION_ENDTYPE_OCC_POSTFIX_0));
        m_seriesEndDate.setDateOnly(true);
        m_seriesEndDate.setAllowInvalidValue(true);
        m_seriesEndDate.setValue(m_model.getSeriesEndDate());
        m_seriesEndDate.getTextField().addFocusHandler(new FocusHandler() {

            public void onFocus(FocusEvent event) {

                if (handleChange()) {
                    onSeriesEndDateFocus(event);
                }

            }
        });
    }
289338
@Override
    public ChronoZonedDateTime<D> with(TemporalField field, long newValue) {
        if (field instanceof ChronoField) {
            ChronoField f = (ChronoField) field;
            switch (f) {
                case INSTANT_SECONDS: return plus(newValue - toEpochSecond(), SECONDS);
                case OFFSET_SECONDS: {
                    ZoneOffset offset = ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue));
                    return create(dateTime.toInstant(offset), zone);
                }
            }
            return ofBest(dateTime.with(field, newValue), zone, offset);
        }
        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), field.adjustInto(this, newValue));
    }
1201800
void setParsed(Chronology chrono) {
        Jdk8Methods.requireNonNull(chrono, "chrono");
        Parsed currentParsed = currentParsed();
        currentParsed.chrono = chrono;
        if (currentParsed.callbacks != null) {
            List<Object[]> callbacks = new ArrayList<Object[]>(currentParsed.callbacks);
            currentParsed.callbacks.clear();
            for (Object[] objects : callbacks) {
                ReducedPrinterParser pp = (ReducedPrinterParser) objects[0];
                pp.setValue(this, (Long) objects[1], (Integer) objects[2], (Integer) objects[3]);
            }
        }
    }
52700
public static GsonBuilder registerDuration(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(DURATION_TYPE, new DurationConverter());

    return builder;
  }