Skip to content

Commit 95c5991

Browse files
always return ms
1 parent f080ee9 commit 95c5991

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/cmd.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"log"
88
"time"
99
"errors"
10+
"strconv"
1011
)
1112

1213
func Run(workDir string, args ...string) (string, string, error, string) {
@@ -54,9 +55,10 @@ func RunStdin(workDir, stdin string, args ...string) (string, string, error, str
5455
}
5556
}
5657

57-
// format example: 186.992733ms
58+
// format example: 186
5859
duration := time.Since(start)
59-
durationString := duration.String()
60+
milliseconds := duration.Milliseconds()
61+
durationString := strconv.FormatInt(milliseconds, 10)
6062

6163
// if timeout occured, prevent stdout from returning
6264
if timeoutReached {

0 commit comments

Comments
 (0)