Topic: Catching Timeouts & Specifying a maximum timeout time?

Hey
my rails 2.3 app makes many calls to the Twitter API. specifcally Tweeting certain things on behalf of users when they perform actions.

Right now, The application is hanging as the Twitter API is unreachable.. which is obviosuly a very bad thing..

I have code in the app which catches the timeout error so we don't get a 500 screen but i want to be able to specify the time taken before raising the timeout error and moving forward

Is this possible?

Here is the code in my app.
Thank you!

@access_token = OAuth::AccessToken.new(TwitterController.consumer, TWITTER_TOKEN, TWITTER_SECRET)
    begin
      @response = @access_token.post('/statuses/update.json', { :status => message })
    rescue
      Exception
      puts "Fail"
    end