Hacker News new | ask | show | jobs
by teddyuk 3392 days ago
How common are get time calls so that they would actually be an issue?

I've worked on quite a few systems and can't think of a time where an api for getting the time would have been called so much that it would affect performance?

2 comments

Timestamped logs, transaction timeouts, http keepalive timeouts, cache expiration/eviction, etc.

Apache and nginx for example, both call gettimeofday() a lot.

Edit: Quick google searches indicate software like redis and memcached also call it quite often.

So does cassandra.
Any application code that includes logging of any sort is going to grab time. All of my code (quite a private set and scientific in nature) calls time() at critical points with identifiers so I can easily investigate issues.