Java loop for a certain duration

后端 未结 8 2146
花落未央
花落未央 2020-12-13 22:10

Is there a way I can do a for loop for a certain amount of time easily? (without measuring the time ourselves using System.currentTimeMillis() ?)

I.e. I want to do s

8条回答
  •  青春惊慌失措
    2020-12-13 22:39

    I don't think there is a way to loop for a certain period of time without checking to see if you've looped for a certain period of time.

提交回复
热议问题