Skip to content

Commit 0072025

Browse files
committed
fix: Fix Build for GOOS=linux GOARCH=arm GOARM=6
1 parent 4168c29 commit 0072025

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkg/util/timeofday/time_of_day.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ const (
3434
// Max is the maximum TimeOfDay value (1 second before midnight)
3535
Max = Time2400
3636

37-
microsecondsPerSecond = 1e6
38-
microsecondsPerMinute = 60 * microsecondsPerSecond
39-
microsecondsPerHour = 60 * microsecondsPerMinute
40-
microsecondsPerDay = 24 * microsecondsPerHour
41-
nanosPerMicro = 1000
42-
secondsPerDay = 24 * 60 * 60
37+
microsecondsPerSecond int64 = 1e6
38+
microsecondsPerMinute = 60 * microsecondsPerSecond
39+
microsecondsPerHour = 60 * microsecondsPerMinute
40+
microsecondsPerDay = 24 * microsecondsPerHour
41+
nanosPerMicro = 1000
42+
secondsPerDay = 24 * 60 * 60
4343
)
4444

4545
// New creates a TimeOfDay representing the specified time.
@@ -147,19 +147,19 @@ func (t TimeOfDay) Hour() int {
147147
if t == Time2400 {
148148
return 24
149149
}
150-
return int(int64(t)%microsecondsPerDay) / microsecondsPerHour
150+
return int(int64(t) % microsecondsPerDay / microsecondsPerHour)
151151
}
152152

153153
// Minute returns the minute offset within the hour specified by t, in the
154154
// range [0, 59].
155155
func (t TimeOfDay) Minute() int {
156-
return int(int64(t)%microsecondsPerHour) / microsecondsPerMinute
156+
return int(int64(t) % microsecondsPerHour / microsecondsPerMinute)
157157
}
158158

159159
// Second returns the second offset within the minute specified by t, in the
160160
// range [0, 59].
161161
func (t TimeOfDay) Second() int {
162-
return int(int64(t)%microsecondsPerMinute) / microsecondsPerSecond
162+
return int(int64(t) % microsecondsPerMinute / microsecondsPerSecond)
163163
}
164164

165165
// Microsecond returns the microsecond offset within the second specified by t,

0 commit comments

Comments
 (0)