// TrackOffset returns the offset for the track link.
779353
func (l *Link) TrackOffset() time.Duration {
	var offsetMs C.int
	C.sp_link_as_track_and_offset(l.sp_link, &offsetMs)
	return time.Duration(offsetMs) / time.Millisecond
}
968156
func (f *File) DataOffset() (offset int64, err error) {
	bodyOffset, err := f.findBodyOffset()
	if err != nil {
		return
	}
	return f.headerOffset + bodyOffset, nil
}
981494
func (o *Object) setOffset(bytesRead int64) error {
	// Update the currentOffset.
	o.currOffset += bytesRead

	if o.objectInfo.Size > -1 && o.currOffset >= o.objectInfo.Size {
		return io.EOF
	}
	return nil
}
416121
func (a *ReadArgs) SetOffset(offset int) *ReadArgs {
	a.Offset = &offset
	return a
}
262304
func randomOffset(n int) int {
	if n == 0 {
		return 0
	}

	val, err := rand.Int(rand.Reader, big.NewInt(int64(n)))
	if err != nil {
		logrus.Errorf("Failed to get a random offset: %v", err)
		return 0
	}

	return int(val.Int64())
}
204440
func (db *Database) Offset(offset int) *Database {
	db = db.clone()
	db.offset = offset
	return db
}
176616
func (o *ListOAuth2ClientsParams) WithOffset(offset *int64) *ListOAuth2ClientsParams {
	o.SetOffset(offset)
	return o
}
601404
func (s *PresetWatermark) SetVerticalOffset(v string) *PresetWatermark {
	s.VerticalOffset = &v
	return s
}
611851
func (g *Grid) GetOffset() (rows, columns int) {
	return g.rowOffset, g.columnOffset
}
1187829
func parseTimeOffset(buff []byte, cursor *int, l int) (*time.Location, error) {

	if buff[*cursor] == 'Z' {
		*cursor++
		return time.UTC, nil
	}

	return parseNumericalTimeOffset(buff, cursor, l)
}
581052
func (d *Decoder) savedOffset() int {
	n := d.saved.Len()
	if d.nextByte >= 0 {
		n--
	}
	return n
}
1089735
func (q *Queue) PeekByOffset(offset uint64) (*Item, error) {
	q.RLock()
	defer q.RUnlock()

	// Check if queue is closed.
	if !q.isOpen {
		return nil, ErrDBClosed
	}

	return q.getItemByID(q.head + offset + 1)
}
75307
func (b *Broker) CommitOffset(request *OffsetCommitRequest) (*OffsetCommitResponse, error) {
	response := new(OffsetCommitResponse)

	err := b.sendAndReceive(request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
322164
func (t *Table) GetOffset() (row, column int) {
	return t.rowOffset, t.columnOffset
}
809264
func alignOffset(offset int64, n int) int64 {
	offset = offset + int64(n) - 1 & ^(int64(n)-1)
	return offset
}
1039361
func (ref *Consumer) MarkPartitionOffset(topic string, partition int32, offset int64, metadata string) {
	ref.Consumer.MarkPartitionOffset(topic, partition, offset, metadata)
}
490675
func (s *MotionImageInserter) SetOffset(v *MotionImageInsertionOffset) *MotionImageInserter {
	s.Offset = v
	return s
}