Re:Please put units in names
by dahfizz on Monday March 21, 2022 @07:49AM
(#30752951)
Many timeout functions take seconds as a floating point. So you could time out on 0.05 seconds (5 milis). But now the code is clear and less prone to bugs.
[ Parent
| on HN ]
Re:Please put units in names
by sethammons on Monday March 21, 2022 @07:56AM
(#30753003)
In Go, you don't pass a float, you pass a duration
Re:Please put units in names
by catlifeonmars on Monday March 21, 2022 @10:57AM
(#30754848)
Which is unitless, hence there is no problem. `time.Duration.Seconds()` returns a floating point.