MCPcopy Create free account
hub / github.com/buggregator/server / computeOffsetMS

Function computeOffsetMS

modules/sentry/api_exceptions.go:446–456  ·  view source on GitHub ↗

computeOffsetMS calculates the offset in ms between two RFC3339 timestamps.

(baseTSStr, spanTSStr sql.NullString)

Source from the content-addressed store, hash-verified

444
445// computeOffsetMS calculates the offset in ms between two RFC3339 timestamps.
446func computeOffsetMS(baseTSStr, spanTSStr sql.NullString) int {
447 if !baseTSStr.Valid || !spanTSStr.Valid {
448 return 0
449 }
450 baseTime, err1 := parseRFC3339(baseTSStr.String)
451 spanTime, err2 := parseRFC3339(spanTSStr.String)
452 if err1 != nil || err2 != nil {
453 return 0
454 }
455 return int(spanTime.Sub(baseTime).Milliseconds())
456}

Callers 2

loadAllSpansFunction · 0.85
loadPreviewSpansFunction · 0.85

Calls 1

parseRFC3339Function · 0.85

Tested by

no test coverage detected