Modified delay to use nanosleep for serving up packets