#
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
|