History log of /fuchsia/zircon/system/utest/core/clock/clock.c
Revision Date Author Comments
# b33437b1 26-Jul-2018 Nick Maniscalco <maniscalco@google.com>

[zircon][kernel] Use proper time types and overflow-safe arithmetic

This change is preparation for converting zx_time_t and zx_duration_t
from unsigned to signed types (ZX-2100).

1. Fix several places where the wrong time type was used (e.g.
zx_time_t instead of zx_duration_t). Because these are simple typedefs
it's easy to use the wrong one. While it generally doesn't cause a
problem, using the wrong type can be misleading and lead to bugs like
passing a relative time when an absolute time is expected.

2. Update kernel/ and some other parts of zircon to use the new
overflow-safe arithmetic functions from zircon/time.h.

Performance: Ran "/pkgfs/packages/zircon_benchmarks/0/bin/app -p" on
NUC before and after this change. Differences were withing the noise,
some slightly faster, some slightly slower.

Test: CQ

ZX-2100 #comment cleanup before conversion

Change-Id: I75d074e5850ade5385decd9bbf330497bf7610e9


# b6086e98 18-Jun-2018 George Kulakowski <kulakowski@google.com>

[time] Introduce zx_clock_get_monotonic

Rather than introduce a failure path into zx_clock_get simply to
report an invalid clock id, we will introduce distinct functions per
clock, for those clocks that cannot fail.

Test: wrote a test that ensures the monotonic clock is positive and
does not go backwards.

ZX-2187

Change-Id: I509710b163a5bbf4b436ad06507e6a16afef4f2b