// Current gives the current value of this sequence atomically.
432223
func (s *AtomicSequence) Current() (uint64, error) {
	if !s.initialized {
		return 0, errors.New("sequence has not been initialized")
	}

	if !s.IsStarted() {
		return 0, errors.New("sequence has not been started")
	}

	return atomic.LoadUint64(&s.current), nil
}
526742
func (p *imageProgress) currentBytes() int64 {
	var b int64
	for _, l := range p.layers {
		b += l.currentBytes
	}
	return b
}
171397
func (b *Bar) Current() int {
	b.mtx.RLock()
	defer b.mtx.RUnlock()
	return b.current
}
1269808
func getCurrent(location, units, lang string) (*owm.CurrentWeatherData, error) {
	w, err := owm.NewCurrent(units, lang, os.Getenv("OWM_API_KEY"))
	if err != nil {
		return nil, err
	}
	w.CurrentByName(location)
	return w, nil
}
124
func (s *AtomicSequence) Load(data []byte) error {
	if s.initialized {
		return errors.New("cannot load into an initialized sequence")
	}

	vals := make(map[string]uint64)
	if err := json.Unmarshal(data, &vals); err != nil {
		return err
	}

	if val, ok := vals["current"]; !ok {
		return errors.New("improperly formatted data or sequence version")
	} else {
		atomic.SwapUint64(&s.current, val)
	}

	if val, ok := vals["increment"]; !ok {
		return errors.New("improperly formatted data or sequence version")
	} else {
		atomic.SwapUint64(&s.increment, val)
	}

	if val, ok := vals["minvalue"]; !ok {
		return errors.New("improperly formatted data or sequence version")
	} else {
		atomic.SwapUint64(&s.minvalue, val)
	}

	if val, ok := vals["maxvalue"]; !ok {
		return errors.New("improperly formatted data or sequence version")
	} else {
		atomic.SwapUint64(&s.maxvalue, val)
	}

	s.initialized = true
	return nil
}
516325
func (s *State) now() *timestamp.Timestamp {
	c := s.Clock
	if c == nil {
		c = clock.GetSystemClock()
	}
	return google.NewTimestamp(c.Now())
}
201952
func (tc *TreeCache) CurrentData(fullPath string) (*ChildData, error) {
	node, err := tc.findNode(fullPath)
	if err != nil {
		return nil, err
	}
	if node.state.Load() != NodeStateLIVE {
		return nil, ErrNodeNotLive
	}

	return node.ChildData(), nil
}
1305929
func (mr *MockClockMockRecorder) Now() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now))
}
1306505
func Current() (int, error) {
	var limit syscall.Rlimit
	if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {
		return 0, err
	}
	return int(limit.Cur), nil
}
1164457
func (bc *BlockChain) CurrentBlock() *types.Block {
	return bc.currentBlock.Load().(*types.Block)
}
340757
func (dc *Context) GetCurrentPoint() (Point, bool) {
	if dc.hasCurrent {
		return dc.current, true
	}
	return Point{}, false
}
516368
func (m *enumerator) Current() ([]byte, int, uint64) {
	var i int
	var v uint64
	if m.lowCurr < len(m.lowIdxs) {
		i = m.lowIdxs[m.lowCurr]
		v = m.currVs[i]
	}
	return m.lowK, i, v
}
1268451
func (i *ProviderIter) Current() (*Provider, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
929360
func (i *ProductIter) Current() (*Product, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
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
}
546167
func (s *Simulated) Now() AbsTime {
	s.mu.RLock()
	defer s.mu.RUnlock()

	return s.now
}
832176
func (f *FSM) Current() string {
	f.stateMu.RLock()
	defer f.stateMu.RUnlock()
	return f.current
}