@@ -17,7 +17,7 @@ const (
dy = 80
fontSize = 75
Rn = 1
- CollectNum = 100
+ CollectNum = 50
Expiration = 10 * time.Minute
)
@@ -96,10 +96,10 @@ func (s *memoryStore) Get(id string, clear bool) (digits []byte) {
}
func (s *memoryStore) collect() {
- now := time.Now()
s.Lock()
defer s.Unlock()
s.numStored = 0
+ now := time.Now()
for e := s.idByTime.Front(); e != nil; {
ev, ok := e.Value.(idByTimeValue)
if !ok {