mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-11-03 10:01:05 +08:00
14 lines
170 B
Go
14 lines
170 B
Go
package server
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
func ptr[T any](in T) *T {
|
|
return &in
|
|
}
|
|
|
|
func sec2dur(in float64) time.Duration {
|
|
return time.Duration(float64(time.Second) * in)
|
|
}
|