1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-18 05:31:35 +08:00
Files
Juan Batiz-Benet f6278735ef net/diag: recursively decrement timeouts.
Not sure this works. we dont have tests for net diag.
We should make some.
cc @whyrusleeping.
2015-01-23 02:08:28 -08:00

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
}