aboutsummaryrefslogtreecommitdiff
path: root/workerpool.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2017-02-10 15:45:14 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2017-02-10 15:45:14 +0200
commit32c72cde80f0c591604f825586d6a4bbbb39d9c5 (patch)
tree2fd80906166fb4b6ff21233fb7e07df7f24532db /workerpool.go
parentoptimization: substitute time.Now() calls with coarse-grained time in hot paths (diff)
downloadfasthttp-32c72cde80f0c591604f825586d6a4bbbb39d9c5.tar.gz
fasthttp-32c72cde80f0c591604f825586d6a4bbbb39d9c5.tar.bz2
fasthttp-32c72cde80f0c591604f825586d6a4bbbb39d9c5.zip
Export CoarseTimeNow and clarify that RequestCtx.Time() and RequestCtx.ConnTime() return time truncated to a second
Diffstat (limited to 'workerpool.go')
-rw-r--r--workerpool.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/workerpool.go b/workerpool.go
index 1faee33..cf602e0 100644
--- a/workerpool.go
+++ b/workerpool.go
@@ -187,7 +187,7 @@ func (wp *workerPool) getCh() *workerChan {
}
func (wp *workerPool) release(ch *workerChan) bool {
- ch.lastUseTime = coarseTimeNow()
+ ch.lastUseTime = CoarseTimeNow()
wp.lock.Lock()
if wp.mustStop {
wp.lock.Unlock()