You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
Basically am building a GUI to control elements in a factory.
When an element's proportion changes outside of it's critical range, it needs to be put back inside it's boundary within 3 seconds.
Is there a class I can use which will place a timelimit on calling a method?
Thanks
Well, you could clock the time when an element is changed, and clock it when the method is called. The method can they react according to how much has passed.
To get the time, you can use the System, java.util.Date, or java.sql.Time class.