misc timing/packet handling function stuff