Returns the current position of the media in milliseconds, if applicable
@return
347599
public long getCurrentPosition() {
        try {
            return mPlayer.getCurrentPosition();
        } catch(Exception e) {
            Log.e(TAG, e.getMessage());
            return -1;
        }
    }
1291672
private static Media getClosestDpi(DpiType current, Media media)
    {
        final Media mediaDpi = Medias.getWithSuffix(media, current.name().toLowerCase(Locale.ENGLISH));
        final Media closest;
        if (mediaDpi.exists())
        {
            closest = mediaDpi;
        }
        else if (current.ordinal() > 0)
        {
            closest = getClosestDpi(DpiType.values()[current.ordinal() - 1], media);
        }
        else
        {
            closest = media;
        }
        return closest;
    }
1349741
def position(self):
        """"""
        now_playing = self._setstate.nowPlayingInfo
        if now_playing.HasField('elapsedTime'):
            return int(now_playing.elapsedTime)

        return None
1193571
public long getLagBytes() {
    try {
      if (inputEditStream != null && inputEditStream.isInProgress()) {
        // for file journals it may happen that we read a segment finalized
        // by primary, but not refreshed by the standby, so length() returns 0
        // hence we take max(-1,lag)
        return Math.max(-1,
            inputEditStream.length() - this.inputEditStream.getPosition());
      }
      return -1;
    } catch (IOException ex) {
      LOG.error("Error getting the lag", ex);
      return -1;
    }
  }
1072977
public long get()
  {
    long now = CurrentTime.currentTime() / 1000;
    
    long oldSequence;
    long newSequence;
    
    do {
      oldSequence = _sequence.get();
      
      long oldTime = oldSequence >>> _timeOffset;
    
      if (oldTime != now) {
        newSequence = ((now << _timeOffset)
                      + (randomLong() & _sequenceRandomMask));
      }
      else {
        // relatively prime increment will use the whole sequence space
        newSequence = oldSequence + _sequenceIncrement;
      }
    } while (! _sequence.compareAndSet(oldSequence, newSequence));
      
    long id = ((now << _timeOffset)
               | _node
               | (newSequence & _sequenceMask));
      
    return id;
  }
1129199
def libvlc_vlm_get_media_instance_position(p_instance, psz_name, i_instance):
    '''
    '''
    f = _Cfunctions.get('libvlc_vlm_get_media_instance_position', None) or \
        _Cfunction('libvlc_vlm_get_media_instance_position', ((1,), (1,), (1,),), None,
                    ctypes.c_float, Instance, ctypes.c_char_p, ctypes.c_int)
    return f(p_instance, psz_name, i_instance)
1071303
public int getMinute()
    {
        Timestamp adjusted = this;
        if (this._offset != null) {
            if (this._offset.intValue() != 0) {
                adjusted = make_localtime();
            }
        }
        return adjusted._minute;
    }
370299
public double getRatio() {

    // get ratio from media format definition
    if (this.ratio > 0) {
      return this.ratio;
    }

    // get ratio from media format definition calculated from ratio sample/display values
    if (this.ratioWidth > 0 && this.ratioHeight > 0) {
      return this.ratioWidth / this.ratioHeight;
    }

    // otherwise calculate ratio
    if (isFixedDimension() && this.width > 0 && this.height > 0) {
      return (double)this.width / (double)this.height;
    }

    return 0d;
  }
1352300
public long getTimestamp()
    {
        while (true)
        {
            long current = System.currentTimeMillis() * 1000;
            long last = lastTimestampMicros.get();
            long tstamp = last >= current ? last + 1 : current;
            if (lastTimestampMicros.compareAndSet(last, tstamp))
                return tstamp;
        }
    }
807359
function(){
        this.frameCount++;
        /** @private */
        var now = Date.now();
        this.__lastTime = this.__lastTime || now;
        this.deltaTime = (this.fixedDelta || exports.globalFixedDelta) ? 1000/Math.min(60, this.__fps) : now - this.__lastTime;
        this.elapsedTime += this.deltaTime;
        this.__lastTime = now;

        this.emit('update', this.deltaTime, this.elapsedTime, this.frameCount);
        return this;
    }
997348
public final double getMedian()
    {
        assertNotEmpty();
        // Sort the data (take a copy to do this).
        double[] dataCopy = new double[getSize()];
        System.arraycopy(dataSet, 0, dataCopy, 0, dataCopy.length);
        Arrays.sort(dataCopy);
        int midPoint = dataCopy.length / 2;
        if (dataCopy.length % 2 != 0)
        {
            return dataCopy[midPoint];
        }
        else
        {
            return dataCopy[midPoint - 1] + (dataCopy[midPoint] - dataCopy[midPoint - 1]) / 2;
        }
    }
1011361
public double getDuration() {
    Map<String, Object> meta = getFileMetaData();
    if (meta != null && meta.containsKey(DURATION)) {
      return ((Number) meta.get(DURATION)).doubleValue();
    }
    return 0;
  }
760184
public int getAge() {
        int ret = 0;
        Date now = new Date(System.currentTimeMillis());
        Date filmDate = getAgeAsDate();
        if (filmDate != null) {
            ret = Math.round((now.getTime() - filmDate.getTime()) / (1000));
            if (ret < 0) {
                ret = 0;
            }
        }
        return ret;
    }
1247857
public static long epochMicros()
    {
        final Instant now = Instant.now();
        final long seconds = now.getEpochSecond();
        final long nanosFromSecond = now.getNano();

        return (seconds * 1_000_000) + (nanosFromSecond / 1_000);
    }
139872
public int bitrate_instant(){
    int _link=(seekable ? current_link : 0);
    if(samptrack==0)
      return (-1);
    int ret=(int)(bittrack/samptrack*vi[_link].rate+.5);
    bittrack=0.f;
    samptrack=0.f;
    return (ret);
  }
868621
private static Media getMediaDpi(Media media)
    {
        Check.notNull(media);

        final DpiType current = dpi;
        if (current == null || current == DpiType.MDPI)
        {
            return media;
        }
        return getClosestDpi(current, media);
    }
818896
public long toMilliseconds() {
        final Date now = new Date();
        return TimeCategory.minus(plus(now), now).toMilliseconds();
    }