Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi, both are answered in the article:

First:

> What’s going on here is that the first call to localtime in glibc opens and reads the contents of /etc/localtime. All subsequent calls to localtime internally call stat, but they do this to ensure that the timezone file has not changed.

and second: read the section titled "Preventing extraneous system calls" for the answer to your second question.



Those "answers" are more about how than why.


Thanks for reading and I'm glad to hear you loved my post!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: