-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use both mini_mktime() and mkttime()
mini_mktime() has less overhead than libc mkttime(), but it doesn't get all the desired fields on all platforms. Prior to this commit, both got called on such platforms, roughly doubling the amount of time spent. So just use the slightly more expensive function on those platforms and avoid that redundant overhead. The only glitch I've seen is that mktime() likely doesn't handle leap seconds the same way mini_mktime() does; so this calls both functions for those very rare instances.
- Loading branch information
1 parent
ebb7a94
commit 36e41d5
Showing
1 changed file
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters