// modtime is the modification time of the resource to be served, or IsZero().
// return value is whether this request is now complete.
486716
func checkLastModified(w http.ResponseWriter, r *http.Request, modtime time.Time) bool {
	if modtime.IsZero() {
		return false
	}

	// The Date-Modified header truncates sub-second precision, so
	// use mtime < t+1s instead of mtime <= t to check for unmodified.
	if t, err := time.Parse(http.TimeFormat, r.Header.Get("If-Modified-Since")); err == nil && modtime.Before(t.Add(1*time.Second)) {
		h := w.Header()
		delete(h, "Content-Type")
		delete(h, "Content-Length")
		w.WriteHeader(http.StatusNotModified)
		return true
	}
	w.Header().Set("Last-Modified", modtime.UTC().Format(http.TimeFormat))
	return false
}
1253296
func FileMTime(file string) (int64, error) {
	f, err := os.Stat(file)
	if err != nil {
		return 0, err
	}
	return f.ModTime().Unix(), nil
}
380150
func (s *CompilationJobSummary) SetLastModifiedTime(v time.Time) *CompilationJobSummary {
	s.LastModifiedTime = &v
	return s
}
286892
func compileTime() time.Time {
	info, err := os.Stat(os.Args[0])
	if err != nil {
		return time.Now()
	}
	return info.ModTime()
}
702604
func (m *Miniredis) SetTime(t time.Time) {
	m.Lock()
	defer m.Unlock()
	m.now = t
}
379915
func queryTime(query url.Values, name string, def time.Time) (time.Time, error) {
	str := query.Get(name)
	if str == "" {
		return def, nil
	}
	parsed, err := time.Parse(time.RFC3339, str)
	if err != nil {
		return time.Time{}, trace.BadParameter("failed to parse %v as RFC3339 time: %v", name, str)
	}
	return parsed, nil
}
210480
func (s *TrainingJobSummary) SetLastModifiedTime(v time.Time) *TrainingJobSummary {
	s.LastModifiedTime = &v
	return s
}
226508
func (t Term) Mod(args ...interface{}) Term {
	return constructMethodTerm(t, "Mod", p.Term_MOD, args, map[string]interface{}{})
}
247000
func (s *DescribeHyperParameterTuningJobOutput) SetLastModifiedTime(v time.Time) *DescribeHyperParameterTuningJobOutput {
	s.LastModifiedTime = &v
	return s
}
1168790
func (h *Timing) ContentLoadTime(contentLoadTime int64) *Timing {
	h.contentLoadTime = contentLoadTime
	h.contentLoadTimeSet = true
	return h
}
972649
func (t *StandardResettingTimer) Time(f func()) {
	ts := time.Now()
	f()
	t.Update(time.Since(ts))
}
236858
func AddTime(ctx context.Context, now time.Time) context.Context {
	return context.WithValue(ctx, requestTime, now)
}
792071
func (f *File) ModTime() time.Time {
	return time.Unix(int64(f.ino.Mtime), 0)
}
740672
func Time(v time.Time) *datatypes.Time {
	r := datatypes.Time{Time: v}
	return &r
}
935263
func (s *EndpointSummary) SetLastModifiedTime(v time.Time) *EndpointSummary {
	s.LastModifiedTime = &v
	return s
}
348786
func (s *DescribeNotebookInstanceOutput) SetLastModifiedTime(v time.Time) *DescribeNotebookInstanceOutput {
	s.LastModifiedTime = &v
	return s
}
540824
func (h *FileHeader) SetModTime(t time.Time) {
	h.ModifiedDate, h.ModifiedTime = timeToMsDosTime(t)
}