thats what i want : use different frequency every n seconds , at least every 5 seconds (ideally every second )
Type: Posts; User: edwardone123
thats what i want : use different frequency every n seconds , at least every 5 seconds (ideally every second )
I did like this and it removes problem this.sound60(freq[44],100,0.5);
but i need to place into sound60 value of each element of array
how can i do it ?
How can do single call ?
when i m trying to call this piece from run() i m getting same problem timer increment on 13 seconds
Where exactly i have to place it ?
try {
for(int i=1;...
Yes run() can call sound .How can i do it ?
Yes that was initial intention : run 2 independent threads
One for paint ( exec every 1 second )
Another thread for loop .
Can I please ask you to add to this program ...
Difference between time before loop and time after loop is 13301 (obtained using system.currenttimemillis() )
Thank you very much
Edward
System.out.println("time 1 "+System.currentTimeMillis());
for(int i=1; i<55; i++){
System.out.println("time 2 "+System.currentTimeMillis());...
System.out.println("time 3 "+System.currentTimeMillis());
for(int i=1; i<55; i++){
this.sound60(freq[i],100,0.5);//day
System.out.println("time 4 ...
then its
time 3 1367607840687
time 4 1367607840893
I have placed 4 currenttimein milliseconds
System.out.println("time 1 "+System.currentTimeMillis());
g.drawString("hour "+ hour + "minute :" + minute + "second :" + second, 14, 30);
...
How can i measure this time ?
I want code to show time on display without delay and at the same time play sound using this.sound60(freq[i],100,0.5) without any delay and interference with showing time .Thank you ...
Thank you very much
Can you please tell me how do i change code?
I do not use timer class .By timer i mean displaying current time on the screen ,which is slow down .To get time i m using calendar
Good morning !
I m new to Java ,but I believe this question about thread organisation in my program ..Can you please help me to optimize it ?
Program has to do count time and show it...