'Called by a timer to actually send packets.
Picks the first packet off this cycle\'s list, sends it, and then puts
it on the next-cycle list.  When this cycle\'s list is empty, starts
the next cycle.'

def _timer_handler(self):

    num = int(self._send_chunk_size)
    fpart = (self._send_chunk_size - num)
    if (random() < fpart):
        num += 1
    for _ in range(num):
        if (len(self._this_cycle) == 0):
            self._this_cycle = self._next_cycle
            self._next_cycle = []
        item = self._this_cycle.pop(0)
        self._next_cycle.append(item)
        core.openflow.sendToDPID(item.dpid, item.packet)
