Results 1 to 2 of 2
  1. #1
    toby is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default Time restricted method

    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

  2. #2
    carl is offline Member
    Join Date
    Jul 2007
    Posts
    35
    Rep Power
    0

    Default

    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.

Similar Threads

  1. Replies: 2
    Last Post: 03-26-2010, 06:12 PM
  2. Hello, first time here.
    By ludragon in forum Introductions
    Replies: 2
    Last Post: 01-03-2008, 06:03 AM
  3. Method execution time
    By javaplus in forum Advanced Java
    Replies: 3
    Last Post: 11-26-2007, 10:51 AM
  4. Time method
    By carderne in forum New To Java
    Replies: 5
    Last Post: 11-05-2007, 10:34 AM
  5. Replies: 1
    Last Post: 07-14-2007, 06:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •