update_histogram with timing of a function

That's actually what `timer:tc` does: https://github.com/erlang/otp/blob/maint/lib/stdlib/src/timer.erl#L192
So may be:
```
{Duration, Result} = timer:tc(Fun),
case notify(Name, Duration div 1000) of
  ok ->
    Result;
  {error, unknown_metric} ->
    throw({unknown_metric, Name})
end;
```