mesa
mesa copied to clipboard
added const secday, which is useful for binary stuff
as the title says.
On balance, I think this is a sensible change. I expect most people recognise factors like 24*60*60
and 86400
as the number of seconds in a day but using secday
is just that little bit clearer and slightly less error prone (e.g. .../24*60*60
instead of .../(24*60*60)
). I'd suggest we wait until early next week to give other devs a chance to respond.
If this is worth changing, you might want to make some substitutions now. Grepping for "\*60\*"
or "\*60d0\*"
in the source (including test cases) turns up some easy replacements.
A bit of a tangential thing, but how would people feel about changing secyer
to secyear
? Guess it would break a bit of external code, but in a pretty trivial way that compilers should be able to suggest how to fix.
or even the more obvious second_per_year. neither here nor there, but the secyer naming is from ~2005.
Personally, I feel like a "fix" like secyear
will just get us into bikeshedding territory, so I'd prefer just to leave it.
(But I fully approve of secday
.)