// IsOutdated implements the Cacheable interface.
513657
func (c *fileCacheable) IsOutdated() (bool, error) {
	fi, err := os.Stat(c.fullname)
	if err != nil {
		return false, errors.Annotate(err, ErrFileChecking, errorMessages)
	}
	if fi.ModTime().After(c.modTime) {
		return true, nil
	}
	return false, nil
}
955532
func (f *FileStore) LastModified() time.Time {
	f.mu.RLock()
	defer f.mu.RUnlock()

	return f.lastModified
}
1043188
func (c *Connection) IdleTimedOut() bool {
	c.timeMu.Lock()
	defer c.timeMu.Unlock()
	return time.Since(c.LastUsedAt) > c.IdleTimeout && c.IdleTimeout != 0
}
992405
func (s *ISOService) GetIsoByID(id string, opts ...OptionFunc) (*Iso, int, error) {
	p := &ListIsosParams{}
	p.p = make(map[string]interface{})

	p.p["id"] = id

	for _, fn := range append(s.cs.options, opts...) {
		if err := fn(s.cs, p); err != nil {
			return nil, -1, err
		}
	}

	l, err := s.ListIsos(p)
	if err != nil {
		if strings.Contains(err.Error(), fmt.Sprintf(
			"Invalid parameter id value=%s due to incorrect long value format, "+
				"or entity does not exist", id)) {
			return nil, 0, fmt.Errorf("No match found for %s: %+v", id, l)
		}
		return nil, -1, err
	}

	if l.Count == 0 {
		return nil, l.Count, fmt.Errorf("No match found for %s: %+v", id, l)
	}

	if l.Count == 1 {
		return l.Isos[0], l.Count, nil
	}
	return nil, l.Count, fmt.Errorf("There is more then one result for Iso UUID: %s!", id)
}
777661
func useCached(downloadTime time.Time, maxAge int) bool {
	freshnessLifetime := int(time.Now().Sub(downloadTime).Seconds())
	if maxAge > 0 && freshnessLifetime < maxAge {
		return true
	}
	return false
}
640583
func isOlder(ti time.Time, olderRef string) bool {
	objectAge := UTCNow().Sub(ti)
	var e error
	var olderThan time.Duration
	if olderRef != "" {
		olderThan, e = ioutils.ParseDurationTime(olderRef)
		fatalIf(probe.NewError(e), "Unable to parse olderThan=`"+olderRef+"`.")
	}
	return objectAge < olderThan
}
1256030
func (dt DateTime) ISOWeek() (year, week int) {
	year, week = dt.t.ISOWeek()
	return
}
1114544
func (s *EventStream) SetLastModifiedDate(v string) *EventStream {
	s.LastModifiedDate = &v
	return s
}
621574
func (y Year) IsOccurring(t time.Time) bool {
	return t.Year() == int(y)
}
360415
func (nu *Numbered) GetOutdated(age time.Duration, purpose string) (vals []interface{}) {
	nu.mu.Lock()
	defer nu.mu.Unlock()
	now := time.Now()
	for _, nw := range nu.resources {
		if nw.inUse || !nw.enforceTimeout {
			continue
		}
		if nw.timeCreated.Add(age).Sub(now) <= 0 {
			nw.inUse = true
			nw.purpose = purpose
			vals = append(vals, nw.val)
		}
	}
	return vals
}
183180
func (s *ConfigurationSettingsDescription) SetDateUpdated(v time.Time) *ConfigurationSettingsDescription {
	s.DateUpdated = &v
	return s
}
118354
func (s *GetPipelineStateOutput) SetUpdated(v time.Time) *GetPipelineStateOutput {
	s.Updated = &v
	return s
}
1361311
func (r *Repository) GetUpdatedAt() Timestamp {
	if r == nil || r.UpdatedAt == nil {
		return Timestamp{}
	}
	return *r.UpdatedAt
}
267317
func (r *RepositoryComment) GetUpdatedAt() time.Time {
	if r == nil || r.UpdatedAt == nil {
		return time.Time{}
	}
	return *r.UpdatedAt
}
567550
func (s *LifecyclePolicy) SetDateModified(v time.Time) *LifecyclePolicy {
	s.DateModified = &v
	return s
}
871322
func (q Query) GetLastModified() time.Time {
	return q.UpdatedAt.Truncate(time.Second)
}
87482
func isObjectDirDangling(errs []error) (ok bool) {
	var notFoundDir int
	for _, readErr := range errs {
		if readErr == errFileNotFound {
			notFoundDir++
		}
	}
	return notFoundDir > len(errs)/2
}