Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (603)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (652)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  System.nanoTime(): good or evil?  (Read 7369 times)
0 Members and 1 Guest are viewing this topic.
Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #30 - Posted 2007-05-04 15:58:09 »

>you realize that it's only a problem on multi-core cpus?

Heh. That would be nice. But there are a dozen different issues with QPC.

I got a single core and QPC is unusable (QPC leaping).

弾幕 ☆ @mahonnaiseblog
Offline fletchergames

Senior Devvie

« Reply #31 - Posted 2007-05-04 18:01:48 »

did you read the whole thread? you realize that it's only a problem on multi-core cpus? Sorry if you are talking about them, I got impression that you aren't.

When using System.nanoTime() on my computer with a single-core CPU, the game I wrote would suddenly pause for about half a second every once in a while (about once per level).  When using the millisecond timer instead, this problem stopped.

So System.nanoTime() has problems on single-core processors (or at least on mine) as well.  System.nanoTime() is evil.
Offline erikd

JGO Ninja

Medals: 16
Projects: 4
Exp: 14 years


« Reply #32 - Posted 2007-05-05 00:44:00 »

I've talked with some other (non-java) developers about the issue, and all of them (okay, they were just 3 people Smiley) use 1ms timing instead of QPC for exactly the same reasons.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Kova

Senior Devvie

« Reply #33 - Posted 2007-05-05 09:18:01 »

damn Sun developers, why did they used damn QPC Smiley ... is there a RFE or bug report on this? It has to be.
I've heard LWJGL times is good, why don't they just use that, or whatever it's based on.
Offline erikd

JGO Ninja

Medals: 16
Projects: 4
Exp: 14 years


« Reply #34 - Posted 2007-05-05 11:39:22 »

..I suppose because the RFE it was based on required high precision, and LWJGL's timer is just 1ms.
I'd rather see a currentTimeMillis implementation with 1ms precision on Windows.

Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #35 - Posted 2007-05-05 22:03:17 »

Somehow, I would like to see that. However, since TGT is something completely different (and may not work properly on some systems, too) a new method would be required if you don't want to create regressions.

The most logical name would be...
System.milliTime() (although... I would like msecTime() more Wink)

弾幕 ☆ @mahonnaiseblog
Pages: 1 [2]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

SHC (21 views)
2015-08-01 03:58:20

Jesse (19 views)
2015-07-29 04:35:27

Riven (39 views)
2015-07-27 16:38:00

Riven (21 views)
2015-07-27 15:35:20

Riven (24 views)
2015-07-27 12:26:13

Riven (14 views)
2015-07-27 12:23:39

BurntPizza (35 views)
2015-07-25 00:14:37

BurntPizza (46 views)
2015-07-24 22:06:39

BurntPizza (28 views)
2015-07-24 06:06:53

NoxInc (36 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!