chore: more docs
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Demo (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

This commit is contained in:
andig 2023-12-22 12:03:10 +01:00
parent 9e23bb6777
commit d05f21cb98

View file

@ -7,6 +7,7 @@ import (
"github.com/evcc-io/evcc/api"
)
// Monitor monitors values for regular updates
type Monitor[T any] struct {
val T
mu sync.RWMutex
@ -16,6 +17,7 @@ type Monitor[T any] struct {
timeout time.Duration
}
// NewMonitor created a new monitor with given timeout
func NewMonitor[T any](timeout time.Duration) *Monitor[T] {
return &Monitor[T]{
done: make(chan struct{}),