aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/testing/testing.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/testing/testing.go')
-rw-r--r--libgo/go/testing/testing.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/testing/testing.go b/libgo/go/testing/testing.go
index 0b3a071..ca2fced 100644
--- a/libgo/go/testing/testing.go
+++ b/libgo/go/testing/testing.go
@@ -75,7 +75,7 @@ func Short() bool {
return *short
}
-// decorate inserts the a final newline if needed and indentation tabs for formatting.
+// decorate inserts the final newline if needed and indentation tabs for formatting.
// If addFileLine is true, it also prefixes the string with the file and line of the call site.
func decorate(s string, addFileLine bool) string {
if addFileLine {
@@ -322,7 +322,7 @@ var timer *time.Timer
// startAlarm starts an alarm if requested.
func startAlarm() {
if *timeout > 0 {
- timer = time.AfterFunc(*timeout*1e9, alarm)
+ timer = time.AfterFunc(time.Duration(*timeout)*time.Second, alarm)
}
}