From 2af58fedb69076f9657899725399ab80810dc74a Mon Sep 17 00:00:00 2001 From: Chris Redford Date: Fri, 20 Apr 2018 15:39:38 -0700 Subject: [PATCH] debug --- agent/agent.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agent/agent.go b/agent/agent.go index 3645705..39976e1 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -24,6 +24,7 @@ func mustBeNil(err error) { type Timer struct { Title string + Debug bool duration time.Duration end time.Time left time.Duration @@ -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) + } } }