Java Timing Services
Standard timing services are
- long System.currentTimeMillis()
- Thread.sleep(long millis)
- Thread.sleep(long millis, int nanos)
Problems with this
- milliseconds are rather course for timing fast networks
- sleep is a request to delay by at least amount given, not a guarantee
- Actual gap may be much longer
- Precision can vary depending on whether rescheduling the JVM is involved