This file contains hidden or 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
/* | |
gcc -Wall -pedantic -std=c99 -O2 -o timegm timegm.c | |
Test manual epoch calculation with tm_yday vs TZ+mktime. | |
On Linux, gcc 4.4.7, the manual method is ~5x faster. | |
Usage: | |
./timegm | |
<ctrl-C> to quit |