?
Solved

Timing...

Posted on 2000-01-12
8
Medium Priority
?
128 Views
Last Modified: 2010-04-01
How can I measure time smaller than a millisecond in java.

Cheers,
Dave
0
Comment
Question by:dht1
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Expert Comment

by:vladi21
ID: 2346519
i tnink you cannot measure time smaller than a 50 millisecond without native support
0
 
LVL 7

Expert Comment

by:vladi21
ID: 2346566
http://forum.java.sun.com/forum?13@40.YLRza9Udkwq^0@.ee77b1d/0

System.currentTimeMillis() has a minimum granularity or 50 millisec (you can't see any checnks of time smaller than that).

 This is not a limitation of Java, its a limitation of Windows ...
0
 
LVL 7

Expert Comment

by:Jan Louwerens
ID: 2347009
>This is not a limitation of Java, its a limitation of Windows ...

....but what if you're not running Java under Windows?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 16

Expert Comment

by:heyhey_
ID: 2347332
>> How can I measure time smaller than a millisecond in java.

How can I measure time smaller than a millisecond in my favourite OS ?

it depends on your OS.
0
 

Author Comment

by:dht1
ID: 2347549
Hmmm... I'm running Win 95, but also want it to work on 98 & 2000.

Essentially I'm trying to interpret an IR input, but want to work out the trasmission timing (which seems to be less than 50ms).

Any bright ideas? Or am I going to have to write a native class in C?
0
 
LVL 7

Accepted Solution

by:
vladi21 earned 200 total points
ID: 2347561
yes
C or assembler :)
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2348402
>>  Win 95, but also want it to work on 98 & 2000

I don't think that either Windows platform support such fine granularity.
0
 

Author Comment

by:dht1
ID: 2348917
Not really the answer I wanted, but it sounds as though it's the only valid one.

Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month6 days, 10 hours left to enroll

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question