Skip to content
Snippets Groups Projects
Commit b6f474ae authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

fixed sendCmix time delay and the interface for bindings time now

parent 903df1b6
No related branches found
No related tags found
No related merge requests found
......@@ -13,12 +13,12 @@ import (
)
type TimeSource interface {
NowMs() int
NowMs() int64
}
// SetTimeSource sets the network time to a custom source.
func SetTimeSource(timeNow TimeSource) {
netTime.Now = func() time.Time {
return time.Unix(0, int64(timeNow.NowMs()*int(time.Millisecond)))
return time.Unix(0,timeNow.NowMs()*int64(time.Millisecond))
}
}
......@@ -34,7 +34,7 @@ type sendCmixCommsInterface interface {
}
// 1.5 seconds
const sendTimeBuffer = 3500 * time.Millisecond
const sendTimeBuffer = 1500 * time.Millisecond
// WARNING: Potentially Unsafe
// Public manager function to send a message over CMIX
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment