time: add methods to convert duration to microseconds and milliseconds#30819
time: add methods to convert duration to microseconds and milliseconds#30819dphan72 wants to merge 1 commit into
Conversation
The return values are integers, as opposed to floats, since the fractionals can be derived from multiplying t.Seconds(). Fixes golang#28564
|
This PR (HEAD: b843ab7) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/167387 to see it. Tip: You can toggle comments from me using the |
|
Message from Robert Griesemer: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/167387. |
|
Message from Gobot Gobot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=1d915070 Please don’t reply on this GitHub thread. Visit golang.org/cl/167387. |
|
Message from Robert Griesemer: Patch Set 1: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/167387. |
|
Message from Gobot Gobot: Patch Set 1: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/167387. |
|
Message from Brad Fitzpatrick: Patch Set 1: Robert, to confirm: you're cool with int64 instead of floats? Please don’t reply on this GitHub thread. Visit golang.org/cl/167387. |
|
Message from Robert Griesemer: Patch Set 1:
Everything below a second is int64 now, and everything above a second is float, which seems ok to me. If one prints ms or us, it's usually whole number, not a fractional ms (otherwise, why not print a us, or use seconds). Rust also returns integers (u128) in these cases. Please don’t reply on this GitHub thread. Visit golang.org/cl/167387. |
The return values are integers, as opposed to floats, since the fractionals can be derived from multiplying t.Seconds(). Fixes #28564 Change-Id: I3796227e1f64ead39ff0aacfbdce912d952f2994 GitHub-Last-Rev: b843ab7 GitHub-Pull-Request: #30819 Reviewed-on: https://go-review.googlesource.com/c/go/+/167387 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
|
This PR is being closed because golang.org/cl/167387 has been merged. |
The return values are integers, as opposed to floats, since the fractionals can be derived from multiplying t.Seconds().
Fixes #28564