public Method

TupleEntry.make_expires(sec=nil)

Returns an expiry Time based on sec which can be one of:

Numeric:sec seconds into the future
true:the expiry time is the start of 1970 (i.e. expired)
nil:it is Tue Jan 19 03:14:07 GMT Standard Time 2038 (i.e. when UNIX clocks will die)

Source Code

# File rinda/tuplespace.rb, line 95
def make_expires(sec=nil)
  case sec
  when Numeric
    Time.now + sec
  when true
    Time.at(1)
  when nil
    Time.at(2**31-1)
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.