Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kpango committed Nov 13, 2018
1 parent fa6cc46 commit 58141bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 35 deletions.
32 changes: 0 additions & 32 deletions glg.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ func New() *Glg {
g.logger.Store(k, v)
}

// return g.startTimerD()
return g
}

Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=

0 comments on commit 58141bc

Please sign in to comment.