Skip to content

Commit 07368ff

Browse files
committed
go - gigasecond - simpler
1 parent aff7134 commit 07368ff

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed
File renamed without changes.

go/gigasecond/gigasecond.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package gigasecond
22

33
import (
4-
"math"
54
"time"
65
)
76

87
// AddGigasecond adds 10^9 seconds to the passed in time.
98
func AddGigasecond(t time.Time) time.Time {
10-
return t.Add(time.Duration(math.Pow10(9)) * time.Second)
9+
return t.Add(1e9 * time.Second)
1110
}

0 commit comments

Comments
 (0)