photoprism/pkg/capture/time.go
Michael Mayer 3e4e72b00f Backend: Move capture package to pkg/
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-01-12 14:25:58 +01:00

13 lines
235 B
Go

package capture
import (
"fmt"
"time"
)
// Time returns the input string with the time elapsed added.
func Time(start time.Time, label string) string {
elapsed := time.Since(start)
return fmt.Sprintf("%s [%s]", label, elapsed)
}