>
> On Mon, Sep 7, 2015 at 3:46 AM, Remko Popma <[email protected]> wrote:
>
>> I deliberately chose that name to be consistent with the data source
>> (System::nanoTime).
>>
>
Still not liking the new API. Just talkin'  : I appreciate your argument
that you "chose that name to be consistent with the data source
(System::nanoTime)" but I think I could claim that this is not great for
encapsulation as it surfaces the mechanics of the implementation in the API
name.


>
>> As to why System::nanoTime is apparently not consistent with
>> System::currentTimeMillis, I suspect the Sun/Oracle engineers did this on
>> purpose to avoid giving the impression that System::nanoTime had anything
>> to do with wall-clock time.
>>
>
I do not buy that one because the name does not reflect that intention (to
me). I would have called the API elapsedNanos() which is ambiguous (elapsed
since when?) which is the point, as reflected in the Javadoc: "The value
returned represents nanoseconds since some fixed but arbitrary *origin*
time".

But, hey, this is not super important, I just thought the API would look
nicer.

Gary


>> With that in mind I prefer the current method names.
>>
>>
>> On Mon, Sep 7, 2015 at 5:29 PM, Gary Gregory <[email protected]>
>> wrote:
>>
>>> Hi All:
>>>
>>> In org.apache.logging.log4j.core.LogEvent, we have two timestamp getters:
>>>
>>> - getNanoTime() (new 2.4)
>>> - getTimeMillis()
>>>
>>> The naming is inconsistent, I propose to change getNanoTime()
>>> to getTimeNanos().
>>>
>>> Thoughts?
>>>
>>> Gary
>>>
>>> --
>>> E-Mail: [email protected] | [email protected]
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>
>
> --
> E-Mail: [email protected] | [email protected]
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to