私が最初System.currentTimeMillis()
に思い浮かぶのは、非常に正確で、long
値を与え、パラメーターSwingTimers
の要求としてはどこにあるかということです。正確だint
とは思わないのですか?SwingTimers
2)単語のタイミングSwingTimer
がxミリ秒かかるとします。タスクを繰り返す場合(カラオケアプリのように単語を強調表示する)、次のコードを含めました:
/*see the time taken for each letter*/
int tik=(int) delay / words[index].length();
/* make adjustment(subtract few millisecs) as per the time taken by each word*/
if(tik <69)
timer.setDelay((int) (delay / words[index].length())-3);
if(tik >=69&&tik<=149)
timer.setDelay((int) (delay / words[index].length())-6);
else if(tik <=150)
timer.setDelay((int) (delay / words[index].length())-9);
else if(tik >150)
timer.setDelay((int) (delay / words[index].length())-100);
静かに動作しますが、時間の経過とともに長さが変わる可能性があるため、これに頼ることはできないと確信しています。これを克服する方法数ミリ秒の変化は私に悲惨な結果をもたらす可能性があるため。
3)同時に、カラオケメーカーとプレーヤーのソフトウェアがどのテクニックに従うのだろうか???、非常に正確です。