Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个物体根据某种算法移动,我想让它每 5 秒以不同的方式移动。我如何使用计时器来做到这一点?
看到这个
Timer time = new Timer(); time.scheduleAtFixedRate(new TimerTask(){ public void run(){ //Do Stuff } }, 0, 1000 * 5);