Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98E1A183BC for ; Fri, 2 Oct 2015 12:19:39 +0000 (UTC) Received: (qmail 36845 invoked by uid 500); 2 Oct 2015 12:19:26 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 36751 invoked by uid 500); 2 Oct 2015 12:19:26 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 36740 invoked by uid 99); 2 Oct 2015 12:19:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2015 12:19:26 +0000 Date: Fri, 2 Oct 2015 12:19:26 +0000 (UTC) From: "Ismael Juma (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-2607) Review `Time` interface and its usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941066#comment-14941066 ] Ismael Juma commented on KAFKA-2607: ------------------------------------ We should probably do this after KAFKA-2606 to make the change simpler. > Review `Time` interface and its usage > ------------------------------------- > > Key: KAFKA-2607 > URL: https://issues.apache.org/jira/browse/KAFKA-2607 > Project: Kafka > Issue Type: Improvement > Affects Versions: 0.8.2.2 > Reporter: Ismael Juma > Labels: newbie > > Two of `Time` interface's methods are `milliseconds` and `nanoseconds` which are implemented in `SystemTime` as follows: > {code} > @Override > public long milliseconds() { > return System.currentTimeMillis(); > } > @Override > public long nanoseconds() { > return System.nanoTime(); > } > {code} > The issue with this interface is that it makes it seem that the difference is about the unit (`ms` versus `ns`) whereas it's much more than that: > https://blogs.oracle.com/dholmes/entry/inside_the_hotspot_vm_clocks > We should probably change the names of the methods and review our usage to see if we're using the right one in the various places. -- This message was sent by Atlassian JIRA (v6.3.4#6332)