mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-18 05:31:35 +08:00

Not sure this works. we dont have tests for net diag. We should make some. cc @whyrusleeping.
15 lines
231 B
Go
15 lines
231 B
Go
package diagnostics_pb
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
func (m *Message) GetTimeoutDuration() time.Duration {
|
|
return time.Duration(m.GetTimeout())
|
|
}
|
|
|
|
func (m *Message) SetTimeoutDuration(t time.Duration) {
|
|
it := int64(t)
|
|
m.Timeout = &it
|
|
}
|