time.Time.Sub (method)

40 uses

	time (current package)
		time.go#L841: func (t Time) Sub(u Time) Duration {
		time.go#L876: 	return now.Sub(t)
		time.go#L889: 	return t.Sub(now)

	archive/zip
		reader.go#L417: 			f.Modified = modified.In(timeZone(msdosModified.Sub(modified)))

	cloud.google.com/go/storage
		storage.go#L578: 		"X-Goog-Expires":       {fmt.Sprintf("%d", int(opts.Expires.Sub(now).Seconds()))},

	crypto/tls
		common.go#L855: 	if len(c.autoSessionTicketKeys) > 0 && c.time().Sub(c.autoSessionTicketKeys[0].created) < ticketKeyRotation {
		common.go#L865: 	if len(c.autoSessionTicketKeys) == 0 || c.time().Sub(c.autoSessionTicketKeys[0].created) >= ticketKeyRotation {
		common.go#L874: 			if c.time().Sub(k.created) < ticketKeyLifetime {
		handshake_client.go#L328: 	ticketAge := uint32(c.config.time().Sub(session.receivedAt) / time.Millisecond)
		handshake_client_tls13.go#L244: 			ticketAge := uint32(c.config.time().Sub(hs.session.receivedAt) / time.Millisecond)
		handshake_server.go#L382: 	if c.config.time().Sub(createdAt) > maxSessionTicketLifetime {
		handshake_server_tls13.go#L280: 		if c.config.time().Sub(createdAt) > maxSessionTicketLifetime {

	github.com/aws/aws-sdk-go/aws/csm
		reporter.go#L69: 		AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))),

	github.com/go-redis/redis/v8/internal/pool
		pool.go#L516: 	if p.opt.IdleTimeout > 0 && now.Sub(cn.UsedAt()) >= p.opt.IdleTimeout {
		pool.go#L519: 	if p.opt.MaxConnAge > 0 && now.Sub(cn.createdAt) >= p.opt.MaxConnAge {

	github.com/golang-migrate/migrate/v4
		migrate.go#L757: 			readTime := migr.FinishedReading.Sub(migr.StartedBuffering)
		migrate.go#L758: 			runTime := endTime.Sub(migr.FinishedReading)

	github.com/jackc/pgx/v4
		conn.go#L420: 		c.log(ctx, LogLevelInfo, "Exec", map[string]interface{}{"sql": sql, "args": logQueryArgs(arguments), "time": endTime.Sub(startTime), "commandTag": commandTag})
		copy_from.go#L159: 			ct.conn.log(ctx, LogLevelInfo, "CopyFrom", map[string]interface{}{"tableName": ct.tableName, "columnNames": ct.columnNames, "time": endTime.Sub(startTime), "rowCount": rowsAffected})
		rows.go#L146: 				rows.logger.log(rows.ctx, LogLevelInfo, "Query", map[string]interface{}{"sql": rows.sql, "args": logQueryArgs(rows.args), "time": endTime.Sub(rows.startTime), "rowCount": rows.rowCount})

	go.opencensus.io/trace
		spanstore.go#L167: 				d := sd.EndTime.Sub(sd.StartTime)
		spanstore.go#L283: 	latency := sd.EndTime.Sub(sd.StartTime)

	go.opencensus.io/zpages
		tracez.go#L226: 		d := t.Sub(lastTime)

	golang.org/x/net/http2
		transport.go#L2725: 		ci.IdleTime = time.Now().Sub(cc.lastActive)

	golang.org/x/net/internal/timeseries
		timeseries.go#L202: 		index := (ts.numBuckets - 1) - int(level.end.Sub(t)/level.size)
		timeseries.go#L398: 	dstInterval := finish.Sub(start) / time.Duration(num)
		timeseries.go#L406: 		advance := int(dstStart.Sub(srcStart) / srcInterval)
		timeseries.go#L436: 					base := srcEnd.Sub(srcStart)
		timeseries.go#L437: 					fraction := overlapEnd.Sub(overlapStart).Seconds() / base.Seconds()

	golang.org/x/net/trace
		events.go#L290: 	return now.Sub(el.LastErrorTime) < maxErrAge
		events.go#L298: 		return t.Sub(el.Start), false
		events.go#L301: 	return t.Sub(prev), prev.Day() != t.Day()
		trace.go#L398: 	elapsed := time.Now().Sub(tr.Start)
		trace.go#L770: 		return t.Sub(tr.Start), false
		trace.go#L773: 	return t.Sub(prev), prev.Day() != t.Day()

	golang.org/x/pkgsite/internal/fetch
		fetch.go#L405: 				if !fi.Finish.IsZero() && now.Sub(fi.Finish) > linger {

	golang.org/x/pkgsite/internal/worker
		server.go#L656: 			return t1.Sub(t2).Round(time.Second)

	net
		dial.go#L141: 	timeRemaining := deadline.Sub(now)

	net/http
		h2_bundle.go#L9229: 		ci.IdleTime = time.Now().Sub(cc.lastActive)

	runtime/pprof
		proto.go#L344: 		b.pb.int64Opt(tagProfile_DurationNanos, b.end.Sub(b.start).Nanoseconds())