michael-o commented on pull request #263: URL: https://github.com/apache/httpcomponents-core/pull/263#issuecomment-780565749
> > > Hi @michael-o , > > I think we might have our signals crossed on the concepts: > > * A `TimeValue` is **not** an instant. A `TimeValue` is an amount of time, I should have been clearer in the Javadoc, for example, "5 SECONDS". So yes, it is equivalent to a `java.time.Duration`. > > * A `Timeout` is a specialization of a `TimeValue` to allow APIs to specify that an argument is represents the concept of "timeout" instead of a "plain" amount of time. > > * An instant, like a Java `Instant` is a point in the time-line like "January 16, 2010 at 17:27 PM UTC". > > * Java 8 provides further refinements like `Period`, so you can express concepts like "one a day", "once a week", "once a month", and so on. > > > If we had started 5.0 on Java 8, I probably would not have added `TimeValue` and `Timeout`, but maybe... too late now ;-) I might have done so as a `Duration` wrapper since `Duration` is final. It's still nice to have a `Timeout` class I think. In fact I have `TimeValue` redone as a `Duration` wrapper in a local git stash, but it's not 100% there yet. Let me go through to understand your position... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
