diff options
| author | 2014-06-24 22:30:11 +0000 | |
|---|---|---|
| committer | 2014-06-24 18:00:13 +0000 | |
| commit | fe7aee2d20b47dad6029a588e0c7394f0c75d080 (patch) | |
| tree | 2bb978afd7a3388fd3e17e6264c7afbbfd80d93b /runtime/utils.h | |
| parent | 1f47b4d8c20e443fac7e8b8b7a77c723fb0be3a1 (diff) | |
| parent | f5997b4d3f889569d5a2b724d83d764bfbb8d106 (diff) | |
Merge "More advanced timing loggers."
Diffstat (limited to 'runtime/utils.h')
| -rw-r--r-- | runtime/utils.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/utils.h b/runtime/utils.h index 6d52459ec8..a61d30fb43 100644 --- a/runtime/utils.h +++ b/runtime/utils.h @@ -265,10 +265,11 @@ std::string PrettySize(int64_t size_in_bytes); // Returns a human-readable time string which prints every nanosecond while trying to limit the // number of trailing zeros. Prints using the largest human readable unit up to a second. // e.g. "1ms", "1.000000001s", "1.001us" -std::string PrettyDuration(uint64_t nano_duration); +std::string PrettyDuration(uint64_t nano_duration, size_t max_fraction_digits = 3); // Format a nanosecond time to specified units. -std::string FormatDuration(uint64_t nano_duration, TimeUnit time_unit); +std::string FormatDuration(uint64_t nano_duration, TimeUnit time_unit, + size_t max_fraction_digits); // Get the appropriate unit for a nanosecond duration. TimeUnit GetAppropriateTimeUnit(uint64_t nano_duration); |