// lostSinceLastTime returns the number of lost samples since the last call to
// lostSinceLastTime(), the pipeLock must be held for writing.
5744
func (nm *NodeMonitor) lostSinceLastTime() uint64 {
	delta := nm.lost - nm.lostLast
	nm.lostLast = nm.lost
	return delta
}
26324
func (s *ConfigExportDeliveryInfo) SetLastSuccessfulTime(v time.Time) *ConfigExportDeliveryInfo {
	s.LastSuccessfulTime = &v
	return s
}
596320
func TimeToExcelTime(t time.Time, date1904 bool) float64 {
	// Get the number of days since the unix epoc
	daysSinceUnixEpoc := float64(t.Unix())/secondsInADay
	// Get the number of nanoseconds in days since Unix() is in seconds.
	nanosPart := float64(t.Nanosecond())/nanosInADay
	// Add both together plus the number of days difference between unix and Excel epocs.
	var offsetDays float64
	if date1904 {
		offsetDays = daysBetween1970And1904
	} else {
		offsetDays = daysBetween1970And1900
	}
	daysSinceExcelEpoc := daysSinceUnixEpoc + offsetDays + nanosPart
	return daysSinceExcelEpoc
}
743765
func DeltaSinceLastCall(getter func() float64) (generator func() float64) {
	lastCount := getter()
	currentCount := lastCount
	generator = func() (delta float64) {
		currentCount = getter()
		delta = currentCount - lastCount
		lastCount = currentCount
		return
	}
	return
}
646584
func (s *PartitionInput) SetLastAccessTime(v time.Time) *PartitionInput {
	s.LastAccessTime = &v
	return s
}
614313
func (stub *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error) {
	hdr, err := utils.GetHeader(stub.proposal.Header)
	if err != nil {
		return nil, err
	}
	chdr, err := utils.UnmarshalChannelHeader(hdr.ChannelHeader)
	if err != nil {
		return nil, err
	}

	return chdr.GetTimestamp(), nil
}
1123896
func (m *MockSendAlgorithm) TimeUntilSend(arg0 protocol.ByteCount) time.Duration {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "TimeUntilSend", arg0)
	ret0, _ := ret[0].(time.Duration)
	return ret0
}
1296077
func (b *builtinValuesTimeSig) evalTime(_ chunk.Row) (types.Time, bool, error) {
	if !b.ctx.GetSessionVars().StmtCtx.InInsertStmt {
		return types.Time{}, true, nil
	}
	row := b.ctx.GetSessionVars().CurrInsertValues
	if row.IsEmpty() {
		return types.Time{}, true, errors.New("Session current insert values is nil")
	}
	if b.offset < row.Len() {
		if row.IsNull(b.offset) {
			return types.Time{}, true, nil
		}
		return row.GetTime(b.offset), false, nil
	}
	return types.Time{}, true, errors.Errorf("Session current insert values len %d and column's offset %v don't match", row.Len(), b.offset)
}
5064
func (h *VHDHeader) TimestampTime() time.Time {
	tstamp := binary.BigEndian.Uint32(h.Timestamp[:])
	return time.Unix(int64(946684800+tstamp), 0)
}
961586
func (_class HostCrashdumpClass) GetTimestamp(sessionID SessionRef, self HostCrashdumpRef) (_retval time.Time, _err error) {
	_method := "host_crashdump.get_timestamp"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostCrashdumpRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertTimeToGo(_method + " -> ", _result.Value)
	return
}
107970
func (l *Limiter) GetHeaderEntryExpirationTTL() time.Duration {
	l.RLock()
	defer l.RUnlock()
	return l.headerEntryExpirationTTL
}
201204
func Timing(name string, value time.Duration, resolution time.Duration, tags map[string]string, opts ...SampleOption) *SSFSample {
	time := float32(value / resolution)
	return Histogram(name, time, tags, append(opts, TimeUnit(resolution))...)
}
457967
func (s *LoggingStatus) SetLastSuccessfulDeliveryTime(v time.Time) *LoggingStatus {
	s.LastSuccessfulDeliveryTime = &v
	return s
}
608253
func (p *Peer) LastPingTime() time.Time {
	p.statsMtx.RLock()
	lastPingTime := p.lastPingTime
	p.statsMtx.RUnlock()

	return lastPingTime
}
221331
func (s *StackResourceDriftInformationSummary) SetLastCheckTimestamp(v time.Time) *StackResourceDriftInformationSummary {
	s.LastCheckTimestamp = &v
	return s
}
614610
func (_class VMSSClass) GetLastRunTime(sessionID SessionRef, self VMSSRef) (_retval time.Time, _err error) {
	_method := "VMSS.get_last_run_time"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVMSSRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertTimeToGo(_method + " -> ", _result.Value)
	return
}
95407
func (soc *Socket) GetRecoveryIvlMsec() (time.Duration, error) {
	v, e := soc.getInt64(C.ZMQ_RECOVERY_IVL_MSEC)
	if v == -1 {
		return -1, e
	}
	return time.Duration(v) * time.Millisecond, e
}