// Current returns the current progress of the bar
171397
func (b *Bar) Current() int {
	b.mtx.RLock()
	defer b.mtx.RUnlock()
	return b.current
}
585399
func (i *ProjectIter) Current() (*Project, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
668935
func newProgressBar(total int64) *progressBar {
	// Progress bar speific theme customization.
	console.SetColor("Bar", color.New(color.FgGreen, color.Bold))

	pgbar := progressBar{}

	// get the new original progress bar.
	bar := pb.New64(total)

	// Set new human friendly print units.
	bar.SetUnits(pb.U_BYTES)

	// Refresh rate for progress bar is set to 125 milliseconds.
	bar.SetRefreshRate(time.Millisecond * 125)

	// Do not print a newline by default handled, it is handled manually.
	bar.NotPrint = true

	// Show current speed is true.
	bar.ShowSpeed = true

	// Custom callback with colorized bar.
	bar.Callback = func(s string) {
		console.Print(console.Colorize("Bar", "\r"+s))
	}

	// Use different unicodes for Linux, OS X and Windows.
	switch runtime.GOOS {
	case "linux":
		// Need to add '\x00' as delimiter for unicode characters.
		bar.Format("┃\x00▓\x00█\x00░\x00┃")
	case "darwin":
		// Need to add '\x00' as delimiter for unicode characters.
		bar.Format(" \x00▓\x00 \x00░\x00 ")
	default:
		// Default to non unicode characters.
		bar.Format("[=> ]")
	}

	// Start the progress bar.
	if bar.Total > 0 {
		bar.Start()
	}

	// Copy for future
	pgbar.ProgressBar = bar

	// Return new progress bar here.
	return &pgbar
}
618058
func (f *Facade) CurrentModel() (params.ModelResult, error) {
	return params.ModelResult{
		Name: f.model.Name(),
		UUID: f.model.UUID(),
		Type: string(f.model.Type()),
	}, nil
}
281706
func (p *Player) Current() time.Duration {
	sample := int64(0)
	p.sync(func() {
		sample = p.pos / bytesPerSample / channelNum
	})
	return time.Duration(sample) * time.Second / time.Duration(p.sampleRate)
}
1230681
func New() *Progress {
	lw := uilive.New()
	lw.Out = Out

	return &Progress{
		Width:           Width,
		Out:             Out,
		Bars:            make([]*Bar, 0),
		RefreshInterval: RefreshInterval,

		tdone: make(chan bool),
		lw:    uilive.New(),
		mtx:   &sync.RWMutex{},
	}
}
41139
func (iter *iterator) CurrentEx() (
	entryEx EntryEx, key, val []byte, err error) {
	if len(iter.cursors) <= 0 {
		return EntryEx{}, nil, nil, ErrIteratorDone
	}

	cursor := iter.cursors[0]

	return EntryEx{Operation: cursor.op}, cursor.k, cursor.v, nil
}
1081243
func (l *pageLexer) current() []byte {
	return l.input[l.start:l.pos]
}
720375
func (it *iterator4Slice) Current() Row {
	if it.cursor == 0 || it.cursor > it.Len() {
		return it.End()
	}
	return it.rows[it.cursor-1]
}
629344
func CurrentTime(value interface{}, op FieldOperation) (interface{}, error) {
	if op == PersistOperation {
		return time.Now(), nil
	} else {
		return value, nil
	}
}
1200007
func Progress(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "progress", Listener: listener}
}
651431
func (c *ProgressBar) IncrProgress() {
	if c.progress < c.total || c.allowOverflow {
		c.progress++
	}
}
63488
func Current(c *context.Context) *User {
	v := c.Values.Get(userKey)
	if v == nil {
		return nil
	}

	u, ok := v.(*User)
	if !ok {
		return nil
	}

	return u
}
51298
func (r *UserResource) Current() (*Account, error) {
	user := Account{}
	if err := r.client.do("GET", "/user", nil, nil, &user); err != nil {
		return nil, err
	}

	return &user, nil
}
363535
func (b *Bar) Incr() bool {
	b.mtx.Lock()
	defer b.mtx.Unlock()

	n := b.current + 1
	if n > b.Total {
		return false
	}
	var t time.Time
	if b.TimeStarted == t {
		b.TimeStarted = time.Now()
	}
	b.timeElapsed = time.Since(b.TimeStarted)
	b.current = n
	return true
}
1326349
func (iter *iteratorSingle) CurrentEx() (
	entryEx EntryEx, key, val []byte, err error) {
	if iter.op == 0 {
		return EntryEx{}, nil, nil, ErrIteratorDone
	}

	return EntryEx{Operation: iter.op}, iter.k, iter.v, nil
}
832176
func (f *FSM) Current() string {
	f.stateMu.RLock()
	defer f.stateMu.RUnlock()
	return f.current
}