chore: more docs
Some checks failed
Some checks failed
This commit is contained in:
parent
9e23bb6777
commit
d05f21cb98
1 changed files with 2 additions and 0 deletions
|
|
@ -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{}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue