Thanks for the suggestions and confirmation that Duration is not a misuse
of that type for this purpose.

Roger


On 2/10/2015 2:38 AM, Stephen Colebourne wrote:
On 9 February 2015 at 23:44, David M. Lloyd <david.ll...@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

Reply via email to