some bug fixes

This commit is contained in:
ston1th 2019-05-05 19:06:51 +02:00
commit 0e914c629e
16 changed files with 179 additions and 52 deletions

View file

@ -3,6 +3,7 @@
package core
import (
"sync"
"time"
)
@ -10,6 +11,13 @@ const (
fileFmt = "20060102_150405"
)
var m sync.Mutex
func FileName() string {
m.Lock()
defer func() {
time.Sleep(time.Millisecond * 1100)
m.Unlock()
}()
return time.Now().Format(fileFmt)
}