// Set sets the current time of the mock clock to a specific one.
// This should only be called from a single goroutine at a time.
502059
func (m *Mock) Set(t time.Time) {
	// Continue to execute timers until there are no more before the new time.
	for {
		if !m.runNextTimer(t) {
			break
		}
	}

	// Ensure that we end with the new time.
	m.mu.Lock()
	m.now = t
	m.mu.Unlock()

	// Give a small buffer to make sure the other goroutines get handled.
	gosched()
}
884934
func (ab *AtomicBool) Set(newVal bool) {
	var i int32
	if newVal {
		i = 1
	}
	atomic.StoreInt32(&(ab.val), int32(i))
}
836596
func (i *AtomicInt64) Set(n int64) {
	atomic.StoreInt64(&i.int64, n)
}
1036994
func (f *FakeClock) SetTime(t time.Time) {
	f.lock.Lock()
	defer f.lock.Unlock()
	f.setTimeLocked(t)
}
66153
func (c *EtcdLockClient) Set(sem *Semaphore) error {
	if sem == nil {
		return errors.New("cannot set nil semaphore")
	}
	b, err := json.Marshal(sem)
	if err != nil {
		return err
	}

	setopts := &client.SetOptions{
		PrevIndex: sem.Index,
	}

	_, err = c.keyapi.Set(context.Background(), c.keypath, string(b), setopts)
	return err
}
1066866
func (tt *Type) Set(v string) error {
	return targetTypeEnum.FlagSet(tt, v)
}
1024149
func (c *LayeredCache) Set(primary, secondary string, value interface{}, duration time.Duration) {
	c.set(primary, secondary, value, duration)
}
313220
func (f *BatchFuture) Set(index uint64, err error) {
	f.index = index
	f.err = err
	close(f.waitCh)
}
938243
func (s *StringValue) Set(v string) error {
	if s.v == nil {
		s.v = new(string)
	}
	*(s.v) = v
	return nil
}
699995
func (m *mockProvider) Set(service, user, pass string) error {
	if m.mockStore == nil {
		m.mockStore = make(map[string]map[string]string)
	}
	if m.mockStore[service] == nil {
		m.mockStore[service] = make(map[string]string)
	}
	m.mockStore[service][user] = pass
	return nil
}
1365283
func (ab *atomicBool) Set(value bool) {
	if value {
		atomic.StoreUint32(&ab.value, 1)
	} else {
		atomic.StoreUint32(&ab.value, 0)
	}
}
1314174
func (mem *Memory) Set(key string, val interface{}, timeout time.Duration) (err error) {
	mem.Lock()
	defer mem.Unlock()

	mem.data[key] = &data{
		Data:    val,
		Expired: time.Now().Add(timeout),
	}
	return nil
}
8631
func (q *TimeQuantum) Set(value string) error {
	*q = TimeQuantum(value)
	return nil
}
281466
func (s *CPU) SetClock(v float64) *CPU {
	s.Clock = &v
	return s
}
1360561
func (i *AtomicInt32) Set(n int32) {
	atomic.StoreInt32(&i.int32, n)
}
607474
func (ai *AtomicInt) Set(newValue int) {
	atomic.StoreInt64(&ai.val, int64(newValue))
}
795095
func (v *ValueChangePublisher) Set(value interface{}) {
	v.mutex.Lock()
	defer v.mutex.Unlock()
	v.value = value
	close(v.notify)
	v.notify = make(chan struct{})
}