MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CreateDuration

Method CreateDuration

eval/public/cel_value.cc:120–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 cel::runtime_internal::kPayloadUrlMissingAttributePath;
119
120CelValue CelValue::CreateDuration(absl::Duration value) {
121 if (value >= cel::runtime_internal::kDurationHigh ||
122 value <= cel::runtime_internal::kDurationLow) {
123 return CelValue(cel::runtime_internal::DurationOverflowError());
124 }
125 return CreateUncheckedDuration(value);
126}
127
128// TODO(issues/136): These don't match the CEL runtime typenames. They should
129// be updated where possible for consistency.

Callers

nothing calls this directly

Calls 2

CelValueClass · 0.85
DurationOverflowErrorFunction · 0.85

Tested by

no test coverage detected