Gets duration of video track in milliseconds.

@return
8302
public long getDurationMillis()
	{
		List<Element> durations = element.getChildren("Duration");

		if (durations.size() != 0)
		{
			final String durationString = durations.get(0).getValue();

			final long duration = Long.parseLong(durationString);

			return duration;
		}
		else
		{
			throw new RuntimeException("No Duration elements present on track!");
		}
	}
1103903
Instant getInstant() {
        // long tsSeconds = TimeUnit.NANOSECONDS.toSeconds(this.timestamp);
        long tsSeconds = this.timestamp / 1000000000L;
        long tsNanos = this.timestamp - (tsSeconds * 1000000000L);
        return Instant.ofEpochSecond(tsSeconds).plusNanos(tsNanos);
    }
731775
public @Nonnull String getTimestampString() {
        long duration = System.currentTimeMillis()-timestamp.getTime();
        return Util.getPastTimeString(duration);
    }
1075816
public synchronized long getBytesPerSecondAndFlush() {
        final long interval = nowMillis() - timestamp;
        if (interval < 1000 && bytesPerSecond != 0) return bytesPerSecond;

        // the first time we using 500 milliseconds to let speed valid more quick
        if (bytesPerSecond == 0 && interval < 500) return 0;

        return getInstantBytesPerSecondAndFlush();
    }
44824
public String getElapsedTimeString() {
        int elapsedSeconds = (int) (getElapsedTime() / 1000);

        if (elapsedSeconds == 0)
            return "0s";

        int minutes = elapsedSeconds / 60;
        elapsedSeconds -= (60 * minutes);

        if (minutes == 0) {
            return elapsedSeconds + "s";
        }

        return minutes + "m " + elapsedSeconds + "s";
    }
417752
public function getVideoDuration()
    {
        $this->ensureMediaGroupIsNotNull();
        if ($this->getMediaGroup()->getDuration() != null) {
            return $this->getMediaGroup()->getDuration()->getSeconds();
        } else {
            return null;
        }
    }
1229397
public long getEstimatedRemainingTimeMillis() {
        long d = executableEstimatedDuration;
        if (d < 0) {
            return DEFAULT_ESTIMATED_DURATION;
        }

        long eta = d - getElapsedTime();
        if (eta <= 0) {
            return DEFAULT_ESTIMATED_DURATION;
        }

        return eta;
    }
1011361
public double getDuration() {
    Map<String, Object> meta = getFileMetaData();
    if (meta != null && meta.containsKey(DURATION)) {
      return ((Number) meta.get(DURATION)).doubleValue();
    }
    return 0;
  }
435511
public function getElapsedTimeInSeconds()
    {
        if(!$this->_timeStartInMicroSeconds)
        {
            return 0;
        }

        $microSecsStart = $this->_timeStartInMicroSeconds;
        $microSecsStop = $this->_timeStopInMicroSeconds;

        if($microSecsStop == 0)
        {
            // The function stopTimer was not called.
            $microSecsStop = microtime(true);
        }

        $seconds = $microSecsStop - $microSecsStart;

        return round($seconds, 4);
    }
716482
def get_stream_duration(stream):
    
    epoch = lal.LIGOTimeGPS(stream.epoch.gpsSeconds,
                            stream.epoch.gpsNanoSeconds)
    # loop over each file in the stream cache and query its duration
    nfile = stream.cache.length
    duration = 0
    for dummy_i in range(nfile):
        for dummy_j in range(lalframe.FrFileQueryNFrame(stream.file)):
            duration += lalframe.FrFileQueryDt(stream.file, 0)
            lalframe.FrStreamNext(stream)
    # rewind stream and return
    lalframe.FrStreamSeek(stream, epoch)
    return duration
1084858
public long getTimeRemainingInMillis()
    {
        long batchTime = System.currentTimeMillis() - startTime;
        double timePerIteration = (double) batchTime / (double) worked.get();
        return (long) (timePerIteration * (total - worked.get()));
    }
392408
private static String getDuration(long millis) {
        long tsec = millis / 1000;
        long h = tsec / 60 / 60;
        long m = (tsec - h * 60 * 60) / 60;
        long s = tsec - h * 60 * 60 - m * 60;
        StringBuffer out = new StringBuffer();
        if (h > 0) {
            out.append(h + " hour");
            if (h > 1) {
                out.append('s');
            }
        }
        if (m > 0) {
            if (h > 0) {
                out.append(", ");
            }
            out.append(m + " minute");
            if (m > 1) {
                out.append('s');
            }
        }
        if (s > 0 || h == 0 && m == 0) {
            if (h > 0 || m > 0) {
                out.append(", ");
            }
            out.append(s + " second");
            if (s != 1) {
                out.append('s');
            }
        }
        return out.toString();
    }
444434
public long currentTimeInMillis() {

        if (this.monotonic || MONOTON_MODE) {
            long nanos = this.utcNanos();
            long secs = LeapSeconds.getInstance().strip(Math.floorDiv(nanos, MRD));
            return Math.multiplyExact(secs, 1000) + Math.floorMod(nanos, MIO);
        } else {
            return System.currentTimeMillis();
        }

    }
1043573
public ZonedDateTime getTime() {
        if (null == time) {
            ZonedDateTime now = ZonedDateTime.now();
            time = new ObjectPropertyBase<ZonedDateTime>(now) {
                @Override protected void invalidated() {
                    zoneId = get().getZone();
                    fireTileEvent(RECALC_EVENT);
                    if (!isRunning() && isAnimated()) {
                        long animationDuration = getAnimationDuration();
                        timeline.stop();
                        final KeyValue KEY_VALUE = new KeyValue(currentTime, now.toEpochSecond());
                        final KeyFrame KEY_FRAME = new KeyFrame(javafx.util.Duration.millis(animationDuration), KEY_VALUE);
                        timeline.getKeyFrames().setAll(KEY_FRAME);
                        timeline.setOnFinished(e -> fireTileEvent(FINISHED_EVENT));
                        timeline.play();
                    } else {
                        currentTime.set(now.toEpochSecond());
                        fireTileEvent(FINISHED_EVENT);
                    }
                }
                @Override public Object getBean() { return Tile.this; }
                @Override public String getName() { return "time"; }
            };
        }
        return time.get();
    }
1138757
def get_video_start_time(video_file):
    """"""
    if not os.path.isfile(video_file):
        print("Error, video file {} does not exist".format(video_file))
        return None
    video_end_time = get_video_end_time(video_file)
    duration = get_video_duration(video_file)
    if video_end_time == None or duration == None:
        return None
    else:
        video_start_time = (
            video_end_time - datetime.timedelta(seconds=duration))
        return video_start_time
852909
public String getRecordingTime() {
		ID3v2TextFrameData frameData = extractTextFrameData(ID_RECTIME);
		if (frameData != null && frameData.getText() != null)
			return frameData.getText().toString();
		return null;
	}
478629
public static long getIdleTimeMillis() {
    long latestEndTimeMillis = -1;

    // If there are any running rapids queries, consider that not idle.
    if (activeRapidsExecs.get() > 0) {
      updateNotIdle();
    }
    else {
      // If there are any running jobs, consider that not idle.
      // Remember the latest job ending time as well.
      Job[] jobs = Job.jobs();
      for (int i = jobs.length - 1; i >= 0; i--) {
        Job j = jobs[i];
        if (j.isRunning()) {
          updateNotIdle();
          break;
        }

        if (j.end_time() > latestEndTimeMillis) {
          latestEndTimeMillis = j.end_time();
        }
      }
    }

    long latestTimeMillis = Math.max(latestEndTimeMillis, lastTimeSomethingHappenedMillis);

    // Calculate milliseconds and clamp at zero.
    long now = System.currentTimeMillis();
    long deltaMillis = now - latestTimeMillis;
    if (deltaMillis < 0) {
      deltaMillis = 0;
    }
    return deltaMillis;
  }