demote NewStream
This commit is contained in:
+4
-4
@@ -1,4 +1,4 @@
|
||||
package main
|
||||
package bandwidth
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
@@ -29,7 +29,7 @@ type stream struct {
|
||||
max time.Duration
|
||||
}
|
||||
|
||||
func NewStream(seconds []int) *stream {
|
||||
func newStream(seconds []int) *stream {
|
||||
extents := []time.Duration{}
|
||||
for _, s := range seconds {
|
||||
extents = append(extents, time.Duration(-s)*time.Second)
|
||||
@@ -113,8 +113,8 @@ func NewBandwidth(seconds []int, dt time.Duration) (*Bandwidth, error) {
|
||||
Tx: make(chan []float64),
|
||||
dt: dt,
|
||||
Quit: make(chan interface{}),
|
||||
rxstream: NewStream(seconds),
|
||||
txstream: NewStream(seconds),
|
||||
rxstream: newStream(seconds),
|
||||
txstream: newStream(seconds),
|
||||
}
|
||||
return r, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user