Is there any way to obtain a low-resolution timestamp fast?



Hi all,

I am the developer of rsyslog, a GPLed alternative syslogd found in many distros.

I am in need of a very fast way to obtain a low-resolution timestamp (within ca one-second resolution), much like time() but faster. I have blogged the complete problem description:

http://blog.gerhards.net/2009/06/high-peformance-low-precision-time-api.html

The only alternative to time I currently see is putting rsyslog to run on a tick, what I really don't like. I would appreciate any suggestions for solving this issue.

Thanks,
Rainer

.