4 ms·
> time.Duration(mins) * time.Minute Seems a bit clunky. Why not time.FromMinutes(mins) or something to that effect? time.Duration is just "casting" an int64 to
by MichaelGG 11y ago
> time.Duration(mins) * time.Minute
Seems a bit clunky. Why not time.FromMinutes(mins) or something to that effect? time.Duration is just "casting" an int64 to a Duration type?
- chrisbroadfoot 11y agoYes. That's why you usually write it like this: time.Now().Add(10 * time.Minute)