Method: Mongoid::Criteria::Queryable::Optional#max_time_ms

Defined in:
lib/mongoid/criteria/queryable/optional.rb

#max_time_ms(value = nil) ⇒ Optional

Adds a cumulative time limit in milliseconds for processing operations on a cursor.

Examples:

Add the max time ms option.

optional.max_time_ms(200)

Parameters:

  • value (Integer) (defaults to: nil)

    The max time in milliseconds for processing operations on a cursor.

Returns:



108
109
110
# File 'lib/mongoid/criteria/queryable/optional.rb', line 108

def max_time_ms(value = nil)
  option(value) { |options| options.store(:max_time_ms, value) }
end