MCPcopy
hub / github.com/dgraph-io/dgraph / newtimer

Function newtimer

graphql/resolve/resolver.go:758–762  ·  view source on GitHub ↗
(ctx context.Context, Duration *schema.OffsetDuration)

Source from the content-addressed store, hash-verified

756}
757
758func newtimer(ctx context.Context, Duration *schema.OffsetDuration) schema.OffsetTimer {
759 resolveStartTime, _ := ctx.Value(resolveStartTime).(time.Time)
760 tf := schema.NewOffsetTimerFactory(resolveStartTime)
761 return tf.NewOffsetTimer(Duration)
762}

Callers 6

ResolveMethod · 0.85
rewriteAndExecuteMethod · 0.85
ResolveMethod · 0.85
rewriteAndExecuteMethod · 0.85
ResolveMethod · 0.85
rewriteAndExecuteMethod · 0.85

Calls 3

NewOffsetTimerFactoryFunction · 0.92
NewOffsetTimerMethod · 0.65
ValueMethod · 0.45

Tested by

no test coverage detected