// get player "lastlogoff" as Time
358853
func (p *PlayerInfo) GetLogoffTime() time.Time {
	return time.Unix(int64(p.Lastlogoff), 0)
}
88181
func (c *Client) GetPlayersStats(leagueKey string, week int, players []Player) ([]Player, error) {
	playerKeys := ""
	for index, player := range players {
		if index != 0 {
			playerKeys += ","
		}
		playerKeys += player.PlayerKey
	}

	content, err := c.GetFantasyContent(
		fmt.Sprintf("%s/league/%s/players;player_keys=%s/stats;type=week;week=%d",
			YahooBaseURL,
			leagueKey,
			playerKeys,
			week))

	if err != nil {
		return nil, err
	}
	return content.League.Players, nil
}
121408
func (u *modelUserEntity) LastLogin() (time.Time, error) {
	// The last connection for the model takes precedence over
	// the local user last login time.
	var err error
	var t time.Time

	model, err := u.st.Model()
	if err != nil {
		return t, errors.Trace(err)
	}

	if !permission.IsEmptyUserAccess(u.modelUser) {
		t, err = model.LastModelConnection(u.modelUser.UserTag)
	} else {
		err = state.NeverConnectedError("controller user")
	}
	if state.IsNeverConnectedError(err) || permission.IsEmptyUserAccess(u.modelUser) {
		if u.user != nil {
			// There's a global user, so use that login time instead.
			return u.user.LastLogin()
		}
		// Since we're implementing LastLogin, we need
		// to implement LastLogin error semantics too.
		err = state.NeverLoggedInError(err.Error())
	}
	return t, errors.Trace(err)
}
953186
func retrieveLastCommitTime(db *sql.DB) (timestamp time.Time, err error) {
	err = db.QueryRow(internal.SelectProposalsLastCommitTime).Scan(&timestamp)
	return
}
396958
func (l *WAL) LastWriteTime() time.Time {
	l.mu.RLock()
	defer l.mu.RUnlock()
	return l.lastWriteTime
}
833488
func LastGCTime(ctx context.Context, fs billy.Filesystem) (
	time.Time, error) {
	fi, err := fs.Stat(repoGCLockFileName)
	if os.IsNotExist(err) {
		return time.Time{}, nil
	} else if err != nil {
		return time.Time{}, err
	}

	return fi.ModTime(), nil
}
1043188
func (c *Connection) IdleTimedOut() bool {
	c.timeMu.Lock()
	defer c.timeMu.Unlock()
	return time.Since(c.LastUsedAt) > c.IdleTimeout && c.IdleTimeout != 0
}
240829
func (stats *LogStats) TotalTime() time.Duration {
	return stats.EndTime.Sub(stats.StartTime)
}
893477
func (b *Backend) getExpirationTimestamp() int32 {
	expiresIn := b.GetConfig().ResultsExpireIn
	if expiresIn == 0 {
		// // expire results after 1 hour by default
		expiresIn = config.DefaultResultsExpireIn
	}
	return int32(time.Now().Unix() + int64(expiresIn))
}
454076
func (_class BlobClass) GetLastUpdated(sessionID SessionRef, self BlobRef) (_retval time.Time, _err error) {
	_method := "blob.get_last_updated"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertBlobRefToXen(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
}
1304709
func (logger *LastSentLogTracker) Get() (int64, int64, error) {
	collection := logger.session.DB(logsDB).C(forwardedC)
	var doc lastSentDoc
	err := collection.FindId(logger.id).One(&doc)
	if err != nil {
		if err == mgo.ErrNotFound {
			return 0, 0, errors.Trace(ErrNeverForwarded)
		}
		return 0, 0, errors.Trace(err)
	}
	return doc.RecordID, doc.RecordTimestamp, nil
}
1328930
func (o *PooledObject) GetLastUsedTime() time.Time {
	trackedUse, ok := o.Object.(TrackedUse)
	if ok && trackedUse.GetLastUsed().After(o.LastUseTime) {
		return trackedUse.GetLastUsed()
	}
	return o.LastUseTime
}
145298
func (db *nodeDB) lastPong(id NodeID) time.Time {
	return time.Unix(db.fetchInt64(makeKey(id, nodeDBDiscoverPong)), 0)
}
1020727
func (h *HostRegistryListener) getTimeout() time.Duration {
	logger := plog.WithField("poolid", h.poolid)

	var p PoolNode
	if err := h.conn.Get("/pools/"+h.poolid, &p); err != nil {
		logger.WithError(err).Warn("Could not look up resource pool for connection timeout")
		return 0
	}

	return p.GetConnectionTimeout()
}
188218
func (_class VBDMetricsClass) GetLastUpdated(sessionID SessionRef, self VBDMetricsRef) (_retval time.Time, _err error) {
	_method := "VBD_metrics.get_last_updated"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVBDMetricsRefToXen(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
}
1164713
func (_m *DFS) Timeout() time.Duration {
	ret := _m.Called()

	var r0 time.Duration
	if rf, ok := ret.Get(0).(func() time.Duration); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(time.Duration)
	}

	return r0
}
371958
func (a *Agent) LastUserEvent() *UserEvent {
	a.eventLock.RLock()
	defer a.eventLock.RUnlock()
	n := len(a.eventBuf)
	idx := (((a.eventIndex - 1) % n) + n) % n
	return a.eventBuf[idx]
}