diff --git a/glg.go b/glg.go index f4da16f..7afeab3 100644 --- a/glg.go +++ b/glg.go @@ -224,7 +224,6 @@ func New() *Glg { g.logger.Store(k, v) } - // return g.startTimerD() return g } @@ -236,37 +235,6 @@ func Get() *Glg { return glg } -// func (g *Glg) startTimerD() *Glg { -// g.timer = new(atomic.Value) -// timeFormat := "2006-01-02 15:04:05" -// -// g.storeTime(timeFormat) -// -// var ctx context.Context -// ctx, g.cancel = context.WithCancel(context.Background()) -// -// go func() { -// ticker := time.NewTicker(time.Millisecond * 500) -// for { -// select { -// case <-ctx.Done(): -// ticker.Stop() -// return -// case <-ticker.C: -// g.storeTime(timeFormat) -// } -// } -// }() -// -// return g -// } -// -// func (g *Glg) storeTime(format string) { -// buf := g.buffer.Get().([]byte) -// g.timer.Store(fastime.Now().AppendFormat(buf[:0], format)) -// g.buffer.Put(buf[:0]) -// } - // Stop stops glg timer daemon func (g *Glg) Stop() *Glg { g.cancel() diff --git a/go.mod b/go.mod index 4448e7a..30f91c4 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/kpango/glg -require github.com/kpango/fastime v0.0.0-20181022060440-408176c9548b +require github.com/kpango/fastime v1.0.0 diff --git a/go.sum b/go.sum index 4e974b7..46d23db 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/kpango/fastime v0.0.0-20181022060440-408176c9548b h1:lTsGeNIoCjN78uW8yncPWjC7G/hNibRAqTId7TG4ZmE= -github.com/kpango/fastime v0.0.0-20181022060440-408176c9548b/go.mod h1:Y5XY5bLG5yc7g2XmMUzc22XYV1XaH+KgUOHkDvLp4SA= +github.com/kpango/fastime v1.0.0 h1:tZeI+eEyHHYKkTkKOiOZ5MeeRJmliuZlGV7aK7S2rkE= +github.com/kpango/fastime v1.0.0/go.mod h1:Y5XY5bLG5yc7g2XmMUzc22XYV1XaH+KgUOHkDvLp4SA=