commit | 248bff5eb8c56dc3c8b4ff2e47c05c7c09cd4849 | [log] [tgz] |
---|---|---|
author | Michael Sevakis <jethead71@rockbox.org> | Wed Jan 25 19:34:13 2017 -0500 |
committer | Michael Sevakis <jethead71@rockbox.org> | Fri Feb 03 14:40:55 2017 -0500 |
tree | 3956b2c20460816e25358985da3a3e45340ff8bb | |
parent | 4d4b0c5a07c907efda20771fa6baca6f1c91802e [diff] |
Improve code for gmtime_r() Unlike the current code, it does no looping to count days or do table lookups, which means running time doesn't increase with year or month. A good thing if it's call a lot, especially if the algorithm were asked to compute dates centuries or more from the epoch start. As a bonus, handles negative time values. Change-Id: I198a23daf621e40623e6b44dacf2387078b4db9c