1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00
miniflux-v2/timer/timer.go

16 lines
404 B
Go

// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
package timer // import "miniflux.app/v2/timer"
import (
"time"
"miniflux.app/v2/logger"
)
// ExecutionTime returns the elapsed time of a block of code.
func ExecutionTime(start time.Time, name string) {
elapsed := time.Since(start)
logger.Debug("%s took %s", name, elapsed)
}