aws/aws-sdk-java — pull request #30 by rtyley (2012-11-27 17:53:39+00:00)
Title: Fix TimingInfo class to use nanoseconds everywhere

Millis and Nanoseconds were being used with this class interchangeably.

It was tricky to work out /which/ this class should be using, of either nanos or millis, but nanos certainly *are* better for measuring elapsed time. The getTimeTakenMillis() method also expects the class to be using nanos internally:

https://github.com/aws/aws-sdk-java/blob/4a138d46/src/main/java/com/amazonaws/util/TimingInfo.java#L59-L61

As does the AWSRequestMetrics class:

https://github.com/aws/aws-sdk-java/blob/4a138d46/src/main/java/com/amazonaws/util/AWSRequestMetrics.java#L112

This is some nice background on the various system clocks available in the JVM:

https://blogs.oracle.com/dholmes/entry/inside_the_hotspot_vm_clocks