JEP 102 Process Updates revised API draft
Stephen Colebourne
scolebourne at joda.org
Tue Feb 10 07:38:29 UTC 2015
On 9 February 2015 at 23:44, David M. Lloyd <david.lloyd at redhat.com> wrote:
> ProcessHandle.Info provides a startTime and totalTime. But it seems odd and
> inconsistent that startTime is an Instant, yet totalTime is a raw long as
> opposed to the arguably more consistent Duration. Is there a reason you
> went with a raw long for this property?
I think using Duration would be OK here, even though the CPU time was
used up in a discontinuous manner. The returned value is, in essence,
a sum of many smaller durations.
I'd also suggest adjusting the two method names:
startTime() -> startInstant()
totalTime() -> totalCpuDuration()
Those communicate the intent more clearly IMO.
Stephen
More information about the core-libs-dev
mailing list