From dev-return-168721-archive-asf-public=cust-asf.ponee.io@commons.apache.org Wed Oct 24 13:18:11 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E326D180638 for ; Wed, 24 Oct 2018 13:18:10 +0200 (CEST) Received: (qmail 9107 invoked by uid 500); 24 Oct 2018 11:18:09 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 9095 invoked by uid 99); 24 Oct 2018 11:18:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2018 11:18:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D0CB5C5ECF for ; Wed, 24 Oct 2018 11:18:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.898 X-Spam-Level: * X-Spam-Status: No, score=1.898 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.de Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 2_WjXK9cS4jj for ; Wed, 24 Oct 2018 11:18:07 +0000 (UTC) Received: from sonic314-20.consmr.mail.ne1.yahoo.com (sonic314-20.consmr.mail.ne1.yahoo.com [66.163.189.146]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 701195F4D8 for ; Wed, 24 Oct 2018 11:18:07 +0000 (UTC) X-YMail-OSG: wIU.S94VM1kw2yoTtz8RpeshrxNOQUauIvBgKI91S7Y5bIRNobmu_j1.yhtbZbj CQoJsMmYygfytEtriCdzDW83EHw5LTlLaK.fftQzQN2I7lRG2ztuH_fYTQeC2AfelxHeiIAmEJAn yTJbpIjXuBdxjvh0PegOBYVBoRHBVV4Gt4lOwQatjX_e0xC8Ab5Qaxnkgzqnf_wZbAdaSH3edgH0 H3n4Ldy.2.sKzcjrQe27lNRoO_9HVhxKrUBhSoLZWjVDElxsVQGR2aUZ5fE6n3L.HPyZ0Rw29PJ3 7ElHG8nbfmJTHpMjVeVaJEvsKs8tNrgNpsRX0tE_guLPpfWNwo9HCm2PTbs5X548QKwlK.ST9hSN 8qOY6eFFRSnqvdvwOBef7Jv7fmPpjK_RJqAvJxLwgSE8zde.olqW5mucPNFuIHH7rWecSvSISq91 pJjmZPwJvAI1VEwaKfT1cNHQlYtUKEokoTChIuKQOElQ2zqAiwL9EVsQXlAl.33HpDTjBCnyRO6G lCpU7L6dUKksz5buWbkIUGPzpW_fJWm9adX7W.vq_o0p1fSJeFOPKyECdvZNwlwZPNywGkpTjoyS PWQKOgev8W.rOB_zQ3vQmlp9NNtOaIzmvJt90f5xVm_EthH.RuKW_LwpTmkWjCK3kWmRPPYgxaQ. A4XK.EQxqI48nX.gvXFZApBPfo0ci_xinoPrRrsWB07LGthbte7A3qFbMvcZMLumkPq7TySBYAlP WOMUbE0Csf_aU.kuHYJSH2sI2zsSka9N85guLy5qDou5YXm.wy5d0URtp4hNGpW3F47DJ6FLq.Dw T.3Ba5nkX7kZpIJ_RtKlDRuiPF6c2BF8oNGE_GGVacQa6Q0sLfilxPCzaOlTJCXdr.3UZs7f04Nk rlfSmEbBRWH3zJom7uG72E3wsYezvMHmRit48KB2Dp2PV5B8OJTpXujWlncDP4bIngXwA3.UoCxc Qke3mkk.7n7rjd_yh9q30JkywqAsOL4AzdxHuLM5BvRlnHwvqvbfEkAk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Wed, 24 Oct 2018 11:18:01 +0000 Date: Wed, 24 Oct 2018 11:17:59 +0000 (UTC) From: Mark Struberg To: Commons Developers List Message-ID: <1037561608.61980.1540379879714@mail.yahoo.com> Subject: usage of System.currentTimeMillis(); MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_61979_1005401542.1540379879712" References: <1037561608.61980.1540379879714.ref@mail.yahoo.com> X-Mailer: WebService/1.1.12666 YMailNorrin Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0 ------=_Part_61979_1005401542.1540379879712 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi folks! While fixing a deadlock in commons-pool I also stumbled across System.currentTimeMillis();quite a few times.It's no biggie but I would still love to get your feedback and experience. If I remember correctly then one should use Sytem.nanoTime() in those cases.a.) afair currentTimeMIllis() might jump back in time (on NTP syncs, etc).b.) on Linux currentTimeMillis might be way more expensive than System.nanoTime(); Mainly depending on whether the underlying HPET is used (slow) or another timer source. What is your experience? Is this still correct?Or is this gone with new boards and more recent JVMs? LieGrue,strub ------=_Part_61979_1005401542.1540379879712--