mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
add common.Duration
This commit is contained in:
parent
cc7f8b85b5
commit
a9a0bebc2f
3 changed files with 41 additions and 9 deletions
|
@ -8,8 +8,8 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"nfsense.net/nfsense/internal/definitions/common"
|
||||
"nfsense.net/nfsense/internal/definitions/config"
|
||||
"nfsense.net/nfsense/internal/util"
|
||||
)
|
||||
|
@ -66,7 +66,7 @@ func getAddressObjectAsPoolRange(conf config.Config, name string) string {
|
|||
return strings.ReplaceAll(conf.Object.Addresses[name].Range.String(), "-", " ")
|
||||
}
|
||||
|
||||
func getTimeInSecond(dur time.Duration) string {
|
||||
func getTimeInSecond(dur common.Duration) string {
|
||||
return fmt.Sprintf("%d", int(dur.Seconds()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue