eclipse / microprofile-metrics

microprofile-metrics
Apache License 2.0
100 stars 66 forks source link

Update SimpleTimer to use java.time.Duration #522

Closed Channyboy closed 4 years ago

Channyboy commented 4 years ago

Modify update() to take a Duration parameter and getElpasedTime() to return a Duration object.

jmartisk commented 4 years ago

Timer is using these types too, so this might get confusing when it uses different types than SimpleTimer. But we can't change Timer in 2.3, so that would be an argument to hold this off until a breaking change release, but on the other hand, doing it for SimpleTimer now would mean fewer breaking changes when the major release happens. What a dilemma. Other than that, I'm not opposed to this change.

jmartisk commented 4 years ago

Fixed by https://github.com/eclipse/microprofile-metrics/pull/526