Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
drgrib committed Apr 20, 2018
1 parent d7e6969 commit 2af58fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func mustBeNil(err error) {

type Timer struct {
Title string
Debug bool
duration time.Duration
end time.Time
left time.Duration
Expand All @@ -46,6 +47,10 @@ func (t *Timer) update() {
floorSeconds := math.Floor(exactLeft.Seconds())
t.left = time.Duration(floorSeconds) * time.Second
t.status = Sprintf("%v", t.left)
if t.Debug {
t.status += "\n"
t.status += Sprintf("\nt.end: %v", t.end)
}
}
}

Expand Down

0 comments on commit 2af58fe

Please sign in to comment.