From 74e8d6eb915f89c0632d3213acb39eb7400dc17a Mon Sep 17 00:00:00 2001 From: mjarkk Date: Thu, 4 Jul 2019 21:25:49 +0200 Subject: [PATCH] Added rounding to timeing --- pkg/commands/container_stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/container_stats.go b/pkg/commands/container_stats.go index ff5ad55e..08960d23 100644 --- a/pkg/commands/container_stats.go +++ b/pkg/commands/container_stats.go @@ -256,7 +256,7 @@ func (c *Container) PlotGraph(spec config.GraphConfig, width int) (string, error asciigraph.Width(width), asciigraph.Min(min), asciigraph.Max(max), - asciigraph.Caption(fmt.Sprintf("%s: %0.2f (%v)", spec.Caption, data[len(data)-1], time.Since(c.StatHistory[0].RecordedAt))), + asciigraph.Caption(fmt.Sprintf("%s: %0.2f (%v)", spec.Caption, data[len(data)-1], time.Since(c.StatHistory[0].RecordedAt).Round(time.Second))), ), nil }