X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-ofctl.c;h=bc8cc6bd8e8391b22d1d6d1c8b66d5cf3b3f3f3b;hb=5160ab34f8e97de8985d75d77c029324e4bccdab;hp=994329e63edb12a90fc6a1d2d65f70a132d39e24;hpb=fcaddd4dd1e8feefc09ea2664ad51fb669d136f8;p=openvswitch diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 994329e6..bc8cc6bd 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -827,9 +827,9 @@ do_ping(int argc, char *argv[]) OFPT_ECHO_REQUEST, &request); random_bytes(rq_hdr + 1, payload); - gettimeofday(&start, NULL); + xgettimeofday(&start); run(vconn_transact(vconn, ofpbuf_clone(request), &reply), "transact"); - gettimeofday(&end, NULL); + xgettimeofday(&end); rpy_hdr = reply->data; if (reply->size != request->size @@ -874,7 +874,7 @@ do_benchmark(int argc OVS_UNUSED, char *argv[]) count, message_size, count * message_size); open_vconn(argv[1], &vconn); - gettimeofday(&start, NULL); + xgettimeofday(&start); for (i = 0; i < count; i++) { struct ofpbuf *request, *reply; struct ofp_header *rq_hdr; @@ -884,7 +884,7 @@ do_benchmark(int argc OVS_UNUSED, char *argv[]) run(vconn_transact(vconn, request, &reply), "transact"); ofpbuf_delete(reply); } - gettimeofday(&end, NULL); + xgettimeofday(&end); vconn_close(vconn); duration = ((1000*(double)(end.tv_sec - start.tv_sec))