Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 10-20-2008, 01:52 PM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
If the pc timer can´get any better than 18 milliseconds.
What timer should one be using when doing signal processing?
JAVA is no good for real time stuff?
or should one look for a dramatical different approach when
going into SP?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #22 (permalink)  
Old 10-20-2008, 04:41 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Norm is on a distinguished road
For the Wait statement all the times are the same. Look at the args for wait() . I guess the nanosecs don't do anything???
For the Spinloop the times vary with the delay time.
Bookmark Post in Technorati
Reply With Quote
  #23 (permalink)  
Old 10-24-2008, 12:54 AM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
For the moment I do not see how to tackle this
problem. So I should live with the fact that
the program runs well on mac but and can not
run on pc because clock can not do
any better than 15 msec (tracks take double of the time)
Bookmark Post in Technorati
Reply With Quote
  #24 (permalink)  
Old 10-24-2008, 09:14 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Norm is on a distinguished road
Quote:
because clock can not do
any better than 15 msec
I thought my spinloop using nanotime could repeatedly call a method in less than 15 msec.
But maybe I'm mistaken
Bookmark Post in Technorati
Reply With Quote
  #25 (permalink)  
Old 10-24-2008, 09:23 PM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
Quote:
Originally Posted by Norm View Post
I thought my spinloop using nanotime could repeatedly call a method in less than 15 msec.
I'm pretty sure that timer resolution is platform implementation defendant.

For many versions of Windows, 18 mSec was as small as you could get reliably.
Bookmark Post in Technorati
Reply With Quote
  #26 (permalink)  
Old 10-24-2008, 09:45 PM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
Maybe a silly question?
How does one do signal processing on PC,
with anything finer as 18 mSec?
Bookmark Post in Technorati
Reply With Quote
  #27 (permalink)  
Old 10-24-2008, 10:56 PM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
Quote:
Originally Posted by willemjav View Post
Maybe a silly question? How does one do signal processing on PC, with anything finer as 18 mSec?
Allow me an edit, PC => Windows box.

Think about it a few seconds. early versions of Windows the OS will not reliably resolve times below 18 msec. If you are inventing something, say an audio capture card, that needs much better timing, what do you do?

The obivious choices are:
1) use something besides windows
2) do it before the signal gets to windows

For most products, #1 is a loser, since 90% of the world's PCs run Windows, and you will not have a mass market for your product if it uses some weird OS.

So how do you do #2? Its easy, use a driver. Design your product to require a driver, put all the magic in the driver or firmware on the card.
Bookmark Post in Technorati
Reply With Quote
  #28 (permalink)  
Old 10-25-2008, 12:33 AM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
could java get to that chard and ignore window box?
Bookmark Post in Technorati
Reply With Quote
  #29 (permalink)  
Old 10-25-2008, 12:38 AM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
what are the changes with linux
lunix runs on pc and java
communicates with linux?
Bookmark Post in Technorati
Reply With Quote
  #30 (permalink)  
Old 10-25-2008, 01:08 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
Quote:
Originally Posted by willemjav View Post
could java get to that chard and ignore window box?
I can't follow this, can you try rephrasing it?
Bookmark Post in Technorati
Reply With Quote
  #31 (permalink)  
Old 10-25-2008, 01:10 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
Quote:
Originally Posted by willemjav View Post
what are the changes with linux? lunix runs on pc and java communicates with linux?
Linux is a different Operating System than Windows. They have nearly nothing in common.

But to do serious timing stuff, you need a driver for linux as well. There are drivers for a lot more weird stuff for Windows XP than there are for Linux
Bookmark Post in Technorati
Reply With Quote
  #32 (permalink)  
Old 10-25-2008, 01:11 AM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
Could the driver that reach the card be written in java?
Java runs on jvm which uses windows?
It is all a little confusing?
Bookmark Post in Technorati
Reply With Quote
  #33 (permalink)  
Old 10-25-2008, 01:16 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 533
fishtoprecords is on a distinguished road
Quote:
Originally Posted by willemjav View Post
Could the driver that reach the card be written in java? Java runs on jvm which uses windows? It is all a little confusing?
You need to do some research on realtime devices, drivers, etc.

Drivers are nearly always written in C or assembly language. They run in protected space, within the O/S. They are not user programs.

Whether or not you could get access to the driver from Java depends on too many things for me to answer. Its implementation dependent.

You might be able to do it with JNI, but JNI is really no longer Java.

You really have some fundamental confusion here about the basic concepts of how device drivers work, what access is allowed, etc.
Bookmark Post in Technorati
Reply With Quote
  #34 (permalink)  
Old 10-25-2008, 01:19 AM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
Anyway what would be the situation of the 18 msec window timer
compared to possible linux timers that java could implement?
I mean to say could I find a higher resolution of timers at linux?
Bookmark Post in Technorati
Reply With Quote
  #35 (permalink)  
Old 10-25-2008, 01:26 AM
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
At the moment I can reach a 1 msec resolution on mac os and
maybe go beyond that!
I am also studying K. sierra´s book that deals with java´s
grammatical issues which I do not master still. I´ll first read that through.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Applet doubts anithababu Java Applets 0 01-18-2008 07:09 AM
Dialog and JList Doubts hemanthjava AWT / Swing 0 12-05-2007 10:42 PM
Sun Java Platform, Standard Edition 6u3 JavaBean Java Announcements 0 10-04-2007 11:10 PM
Sun Java Platform, Standard Edition 6u2 JavaBean Java Announcements 0 07-08-2007 07:45 PM
Doubts with the method handleEvent() Albert Advanced Java 1 07-06-2007 07:12 PM


All times are GMT +3. The time now is 09:42 AM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org