diff options
author | Aliaksandr Valialkin <valyala@gmail.com> | 2017-02-10 15:45:14 +0200 |
---|---|---|
committer | Aliaksandr Valialkin <valyala@gmail.com> | 2017-02-10 15:45:14 +0200 |
commit | 32c72cde80f0c591604f825586d6a4bbbb39d9c5 (patch) | |
tree | 2fd80906166fb4b6ff21233fb7e07df7f24532db /workerpool.go | |
parent | optimization: substitute time.Now() calls with coarse-grained time in hot paths (diff) | |
download | fasthttp-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.go | 2 |
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() |