Unverified Commit 957f65f6 authored by watermelon's avatar watermelon Committed by GitHub

Merge pull request #46 from aliiohs/exposeMaxWheelTimeSpan

Fix:ExposeMaxWheelTimeSpan
parents fb33e078 f9c6e8b9
...@@ -45,7 +45,8 @@ const ( ...@@ -45,7 +45,8 @@ const (
pendingDuration = 3e9 pendingDuration = 3e9
defaultQLen = 1024 defaultQLen = 1024
maxIovecNum = 10 maxIovecNum = 10
maxWheelTimeSpan = 900e9 // 900s, 15 minute //MaxWheelTimeSpan 900s, 15 minute
MaxWheelTimeSpan = 900e9
defaultSessionName = "session" defaultSessionName = "session"
defaultTCPSessionName = "tcp-session" defaultTCPSessionName = "tcp-session"
...@@ -65,7 +66,7 @@ var ( ...@@ -65,7 +66,7 @@ var (
func init() { func init() {
span := 100e6 // 100ms span := 100e6 // 100ms
buckets := maxWheelTimeSpan / span buckets := MaxWheelTimeSpan / span
wheel = gxtime.NewWheel(time.Duration(span), int(buckets)) // wheel longest span is 15 minute wheel = gxtime.NewWheel(time.Duration(span), int(buckets)) // wheel longest span is 15 minute
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment