MCPcopy
hub / github.com/prometheus/prometheus / FromTime

Function FromTime

model/timestamp/timestamp.go:22–24  ·  view source on GitHub ↗

FromTime returns a new millisecond timestamp from a time.

(t time.Time)

Source from the content-addressed store, hash-verified

20
21// FromTime returns a new millisecond timestamp from a time.
22func FromTime(t time.Time) int64 {
23 return t.UnixMilli()
24}
25
26// Time returns a new time.Time object from a millisecond timestamp, in UTC.
27func Time(ts int64) time.Time {

Callers 15

foreachFmtSampleCaseFunction · 0.92
TestWatcher_TailFunction · 0.92
SetStartTimeMethod · 0.92
runMethod · 0.92
testTemplateParsingFunction · 0.92
ConsumeMetricsMethod · 0.92
TestOTLPWriteHandlerFunction · 0.92
writeMethod · 0.92
writeV2Method · 0.92
TestDropOldTimeSeriesFunction · 0.92
TestIsSampleOldFunction · 0.92

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…