Skip to content
Commit 8f5d0791 authored by Keith Packard's avatar Keith Packard Committed by Carles Cufí
Browse files

sys/time_units.h: Convert time conversion to macros



The intent of this patch is to leave all of the semantics of the macros
unchanged, only replacing the easy-to-read static inline conversion
function with a pile of ?: operators.

Ick. This is not a cleanup. However, what it does enable is using constant
results while initializing global variables, which cannot be done with
either static inline functions or even statement expressions, even when
those generate constant results.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent a8497c52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment