Method: EventMachine.set_quantum
- Defined in:
- lib/eventmachine.rb
.set_quantum(mills) ⇒ Object
For advanced users. This function sets the default timer granularity, which by default is slightly smaller than 100 milliseconds. Call this function to set a higher or lower granularity. The function affects the behavior of add_timer and add_periodic_timer. Most applications will not need to call this function.
Avoid setting the quantum to very low values because that may reduce performance under some extreme conditions. We recommend that you not use values lower than 10.
This method only can be used if event loop is running.
902 903 904 |
# File 'lib/eventmachine.rb', line 902 def self.set_quantum mills set_timer_quantum mills.to_i end |