Wireshark mailing list archives

Re: Tips regarding measuring function execution times


From: Guy Harris <guy () alum mit edu>
Date: Mon, 16 Oct 2017 00:46:12 -0700

On Oct 15, 2017, at 1:32 PM, Peter Wu <peter () lekensteyn nl> wrote:

Not sure about the Status line question, but you can measure elapsed
microseconds with something like:

   guint64 start_time, end_time;

   start_time = g_get_monotonic_time();
   // ...
   end_time = g_get_monotonic_time();
   // ...
   g_print("elapsed us: %" G_GUINT64_FORMAT, end_time - start_time);

That gives you elapsed *wall-clock* microseconds; I suspect what he needs are *CPU* microseconds for the particular 
process running Wireshark.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: