Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 46821 invoked from network); 15 Dec 2005 08:53:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Dec 2005 08:53:30 -0000 Received: (qmail 25567 invoked by uid 500); 15 Dec 2005 08:53:22 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 25543 invoked by uid 500); 15 Dec 2005 08:53:22 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 25532 invoked by uid 99); 15 Dec 2005 08:53:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2005 00:53:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [134.98.65.18] (HELO gateway.elsag.de) (134.98.65.18) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2005 00:53:21 -0800 Received: from vwall.elsag.de by gateway.elsag.de via smtpd (for asf.osuosl.org [140.211.166.49]) with ESMTP; Thu, 15 Dec 2005 09:53:01 +0100 Received: from esmail ([192.168.2.88]) by vwall-vs.elsag.de with InterScan Messaging Security Suite; Thu, 15 Dec 2005 09:53:00 +0100 Received: from esmail by esmail via smtpd (for vwall.elsag.de [192.168.100.108]) with ESMTP; Thu, 15 Dec 2005 09:53:00 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Gump & VM Date: Thu, 15 Dec 2005 09:53:00 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Gump & VM Thread-Index: AcYBU4h+gdAJV2dkR5+0mJ2mUHcGMAAAM6Tw From: =?iso-8859-1?Q?J=F6rg_Schaible?= To: "Jakarta Commons Developers List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N C. Grobmeier wrote on Thursday, December 15, 2005 9:46 AM: > > So what can we do? >=20 > I read about timers in the book "killer game programming in java" :-), > where this things are important. Maybe this is a direction for you. >=20 > Use the following instead of System.currentTimeMillis(): >=20 > 1) Suns undocumented Class (Java2): sun.misc.Perf Non-portable > 2) Java 5: System.nanoTime() Not JDK 1.3 compatible as the rest of the classes in id > This two have a higher resolution than currentTimeMillis() > and could help. And I doubt that it will help if the OS (or an appropriate daemon task) = is manipulating the system clock. The problem is not too *less* = resolution, it is too *much* - at least with daemons adjusting system = time smoothly. Descreasing the resolution means, that the code might not = be affected if such a daemon shifts the system time by some millis into = the past. - J=F6rg --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org