Thread
:
Faster loop scheduling
View Single Post
#
3
09-02-2017, 15:40
AlexanderTheOK
Guy
no team
Join Date: Jan 2014
Rookie Year: 2012
Location: Los Angeles
Posts: 148
Re: Faster loop scheduling
While putting a thread.sleep in a while loop works, I prefer the more institutional method of using a
scheduledExecutorService
. It's good for when you're not certain how long some code will take exactly.
AlexanderTheOK
View Public Profile
Find all posts by AlexanderTheOK
Find CD-Media Photos by AlexanderTheOK
Find CD-Media Papers by AlexanderTheOK