Displaying 1 result from an estimated 1 matches for "current_nsec".
Did you mean:
current_msc
2023 Feb 16
0
[RFC PATCH v1 12/12] test/vsock: MSG_ZEROCOPY support for vsock_perf
...fprintf(stderr, "'malloc()' failed\n");
>+ exit(EXIT_FAILURE);
>+ }
> }
Eventually to simplify the code I think we can use the mmaped buffer in
both cases.
>
> memset(data, 0, buf_size_bytes);
> total_send = 0;
>+ time_in_send = 0;
> tx_begin_ns = current_nsec();
>
> while (total_send < to_send_bytes) {
> ssize_t sent;
>+ size_t rest_bytes;
>+ time_t before;
>+
>+ rest_bytes = to_send_bytes - total_send;
>
>- sent = write(fd, data, buf_size_bytes);
>+ before = current_nsec();
>+ sent = send(fd, data, (rest_byt...