Closed sducamp closed 4 years ago
Hi, this has been modeled after Java's Duration
, which does the same:
https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html
What's your use case?
Hi, thank you for your response.
My use case is, at some point I get a Duration of 20736 seconds and I need to display this Duration to the final user in hours like 5,76 hours. I expect that the toHours()
method gives me the solution but not.
So I need to do manually toSeconds() / 3600
.
So I need to do manually toSeconds() / 3600.
That seems reasonable to me!
Hi,
Just for my own knowledge, why don't you use float to represent the duration ? For exemple, if I have 5400 seconds, I expect that the
toHours()
method returns 1.5.Thank you in advance for your reply.