Examples of toMillis()


Examples of java.util.concurrent.TimeUnit.toMillis()

          value.setReduceShuffleBytes(attempt.getCounters().get(REDUCE_SHUFFLE_BYTES));
        }
               
        key.setTime(currentUnitStart.getTimeInMillis());
       
        if ((key.getTime() + unit.toMillis(1)) >= start && start >= key.getTime())
        {
          value.setStarted(1);
        }
       
        if ((key.getTime() + unit.toMillis(1)) >= end && end >= key.getTime())
View Full Code Here

Examples of java.util.concurrent.TimeUnit.toMillis()

        if ((key.getTime() + unit.toMillis(1)) >= start && start >= key.getTime())
        {
          value.setStarted(1);
        }
       
        if ((key.getTime() + unit.toMillis(1)) >= end && end >= key.getTime())
        {
          value.setFinished(1);
        }
       
        currentTime = nextMillis;
View Full Code Here

Examples of java.util.concurrent.TimeUnit.toMillis()

    }

    @Test
    public void testLastAccessTime() throws InterruptedException {
        final TimeUnit timeUnit = TimeUnit.NANOSECONDS;
        final long startTime = timeUnit.toMillis(System.nanoTime());

        HazelcastInstance h1 = createHazelcastInstance();
        IMap<String, String> map1 = h1.getMap(name);

        String key = "key";
View Full Code Here

Examples of java.util.concurrent.TimeUnit.toMillis()

        final String expiration = System.getProperty(EXPIRATION_PROP, DEFAULT_EXPIRATION);
        final String expirationUnit =
                System.getProperty(EXPIRATION_PROP_UNIT, DEFAULT_EXPIRATION_UNIT);
        final long expirationValue = Long.parseLong(expiration);
        final TimeUnit expirationUnitValue = TimeUnit.valueOf(expirationUnit);
        final long expireAfterMs = expirationUnitValue.toMillis(expirationValue);
        timers = new ExpiringCache<ConfigUnit, Timer>(expireAfterMs,
                new ConcurrentHashMapV8.Fun<ConfigUnit, Timer>() {
            @Override
            public Timer apply(final ConfigUnit configUnit) {
                return new BasicTimer(configUnit.config, configUnit.unit);
View Full Code Here

Examples of java.util.concurrent.TimeUnit.toMillis()

        final String expiration = System.getProperty(EXPIRATION_PROP, DEFAULT_EXPIRATION);
        final String expirationUnit =
                System.getProperty(EXPIRATION_PROP_UNIT, DEFAULT_EXPIRATION_UNIT);
        final long expirationValue = Long.parseLong(expiration);
        final TimeUnit expirationUnitValue = TimeUnit.valueOf(expirationUnit);
        final long expireAfterMs = expirationUnitValue.toMillis(expirationValue);
        counters = new ExpiringCache<MonitorConfig, Counter>(expireAfterMs,
                new ConcurrentHashMapV8.Fun<MonitorConfig, Counter>() {
                    @Override
                    public Counter apply(final MonitorConfig config) {
                        return new StepCounter(config);
View Full Code Here

Examples of javafx.util.Duration.toMillis()

            timeLabel.setText(formatTime(currentTime));
            if (!timeSlider.isDisabled()
                    && duration.greaterThan(Duration.ZERO)
                    && !timeSlider.isValueChanging()) {
                timeSlider.valueProperty().removeListener(seekListener);
                timeSlider.setValue(currentTime.toMillis());
                timeSlider.valueProperty().addListener(seekListener);
            }

        });
    }
View Full Code Here

Examples of org.apache.camel.util.Time.toMillis()

        // compute if we were within the allowed time range
        Time current = new Time(currentDate.getTime(), TimeUnit.MILLISECONDS);
        Time other = new Time(otherDate.getTime(), TimeUnit.MILLISECONDS);
        // must absolute delta as when we hit the boundaries the delta would negative
        long delta = Math.abs(other.toMillis() - current.toMillis());
        was = "delta: " + delta + " millis";

        if (timeFrom != null) {
            long from = timeFrom.toMillis();
            answer = delta >= from;
View Full Code Here

Examples of org.apache.camel.util.Time.toMillis()

        // compute if we were within the allowed time range
        Time current = new Time(currentDate.getTime(), TimeUnit.MILLISECONDS);
        Time other = new Time(otherDate.getTime(), TimeUnit.MILLISECONDS);
        // must absolute delta as when we hit the boundaries the delta would negative
        long delta = Math.abs(other.toMillis() - current.toMillis());
        was = "delta: " + delta + " millis";

        if (timeFrom != null) {
            long from = timeFrom.toMillis();
            answer = delta >= from;
View Full Code Here

Examples of org.apache.camel.util.Time.toMillis()

        // compute if we were within the allowed time range
        Time current = new Time(currentDate.getTime(), TimeUnit.MILLISECONDS);
        Time other = new Time(otherDate.getTime(), TimeUnit.MILLISECONDS);
        // must absolute delta as when we hit the boundaries the delta would negative
        long delta = Math.abs(other.toMillis() - current.toMillis());
        was = "delta: " + delta + " millis";

        if (timeFrom != null) {
            long from = timeFrom.toMillis();
            answer = delta >= from;
View Full Code Here

Examples of org.gstreamer.ClockTime.toMillis()

            while (hasNotEnded() && isPlayBinReady() && !isCancelled()) {

                synchronized (playbinLock) {
                    pos = gstPlaybin2.queryPosition();
                }
                millisElapsed = pos.toMillis();

                // pick out the elapsed hours, minutes, seconds
                long secondsElapsed = millisElapsed / 1000;
                elapsedHours = (int) secondsElapsed / 3600;
                secondsElapsed -= elapsedHours * 3600;
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.