Timing...

How can I measure time smaller than a millisecond in java.

Cheers,
Dave
dht1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vladi21Commented:
i tnink you cannot measure time smaller than a 50 millisecond without native support
0
vladi21Commented:
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
Jan LouwerensSoftware EngineerCommented:
>This is not a limitation of Java, its a limitation of Windows ...

....but what if you're not running Java under Windows?
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

heyhey_Commented:
>> 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
dht1Author Commented:
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
vladi21Commented:
yes
C or assembler :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
heyhey_Commented:
>>  Win 95, but also want it to work on 98 & 2000

I don't think that either Windows platform support such fine granularity.
0
dht1Author Commented:
Not really the answer I wanted, but it sounds as though it's the only valid one.

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.