some bug fixes
This commit is contained in:
parent
0e49d60994
commit
0e914c629e
16 changed files with 179 additions and 52 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue