1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-03 15:55:20 -05:00

Remove call to UTC() which is not necessary.

This commit is contained in:
V2Ray
2015-10-29 12:04:14 +01:00
parent d0ae47e2ce
commit fdb41bbd50
4 changed files with 7 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ func (queue *TimedQueue) RemovedEntries() <-chan interface{} {
func (queue *TimedQueue) cleanup(tick <-chan time.Time) {
for now := range tick {
nowSec := now.UTC().Unix()
nowSec := now.Unix()
for {
queue.access.RLock()
queueLen := queue.queue.Len()

View File

@@ -12,7 +12,7 @@ func TestTimedQueue(t *testing.T) {
removed := make(map[string]bool)
nowSec := time.Now().UTC().Unix()
nowSec := time.Now().Unix()
q := NewTimedQueue(2)
go func() {
@@ -51,7 +51,7 @@ func TestTimedQueue(t *testing.T) {
<-tick
assert.Bool(removed["Values"]).IsFalse()
q.Add("Value1", time.Now().UTC().Unix()+10)
q.Add("Value1", time.Now().Unix()+10)
<-tick
v1, ok = removed["Value1"]