MCPcopy
hub / github.com/kopia/kopia / Duration

Method Duration

notification/notifydata/error_info.go:36–38  ·  view source on GitHub ↗

Duration returns the duration of the operation.

()

Source from the content-addressed store, hash-verified

34
35// Duration returns the duration of the operation.
36func (e *ErrorInfo) Duration() time.Duration {
37 return e.EndTimestamp().Sub(e.StartTimestamp())
38}
39
40// NewErrorInfo creates a new ErrorInfo.
41func NewErrorInfo(operation, operationDetails string, startTime, endTime time.Time, err error) *ErrorInfo {

Callers 15

TestNewErrorInfoFunction · 0.95
runMethod · 0.45
appendActionCommandRowsFunction · 0.45
refreshLockedMethod · 0.45
randomTimeFunction · 0.45
EstimateMethod · 0.45
randomSleepMethod · 0.45
handleRepoConnectFunction · 0.45
internalRetryFunction · 0.45

Calls 3

EndTimestampMethod · 0.95
StartTimestampMethod · 0.95
SubMethod · 0.80

Tested by 7

TestNewErrorInfoFunction · 0.76
randomTimeFunction · 0.36
makeVersionsMetadataFunction · 0.36
randomDurationFunction · 0.36
TestUTCTimestampFunction · 0.36