Wireshark-dev: Re: [Wireshark-dev] Tips regarding measuring function execution times
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 16 Oct 2017 00:46:12 -0700
On Oct 15, 2017, at 1:32 PM, Peter Wu <peter@xxxxxxxxxxxxx> 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.