添加次数,计算总时间
我尝试用时间计算一个列表。但使用 Joda Time 中的 LocalTime 我只能得到 24 小时。
使用什么正确的类来获得例如 34 小时 20 分钟 14 秒?
提前致谢
I try to calculate a List with times. But using LocalTime from Joda Time I can only get a 24 hours.
What is the right class to use to get e.g. 34hours 20minutes 14 seconds?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能会寻找期间:
You may be look for Period:
如果您想添加时间,这样您就可以知道中间有多少小时/秒...,如果您使用简单的毫秒计算,添加所有毫秒,然后从第一次中减去毫秒,您可能会更好,就这样,你的跨度以毫秒为单位......
If you are looking to add times, so you can tell how many hours/seconds... are in between, you would maybe be better off if you use plain miliseconds calculations, add all the miliseconds and then subsrtact the miliseconds from your first time, and there you are, you have the span in miliseconds...