poll a function on an interval emit data