Equivalent to javax.swing.Timer in Android
问题 Is there something that looks like the javax.swing.Timer on Android. I know how to create own Threads, but is there something that is like the swing-timer? 回答1: There is also Java's TimerTask. Here's an example from my code where I'm playing audio samples: import java.util.Timer; import java.util.TimerTask; // from constructor, shown here out of place timer = new Timer(); // and in method, again, shown out of place: INTERVAL_MILLISECONDS = (int)((double)(bufSize) / (double)(nativeSampleRate *