Add get event loop function.