diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-12 17:12:10 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-12 17:12:10 +0100 |
commit | 8b246de2a587454f9260ff91192d27a2e168ea2d (patch) | |
tree | eaf442ec207ba1f626119be4f983c69c9c2b5ba3 /runtime/datetime.h | |
parent | 6b722a09d419ad2a552710260bb8e220858f17c2 (diff) | |
download | rsyslog-8b246de2a587454f9260ff91192d27a2e168ea2d.tar.gz rsyslog-8b246de2a587454f9260ff91192d27a2e168ea2d.tar.xz rsyslog-8b246de2a587454f9260ff91192d27a2e168ea2d.zip |
some light performance enhancement
...by replacing time() call with much faster (at least under linux)
gettimeofday() calls.
Diffstat (limited to 'runtime/datetime.h')
-rw-r--r-- | runtime/datetime.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/datetime.h b/runtime/datetime.h index 8140eb71..1de3db95 100644 --- a/runtime/datetime.h +++ b/runtime/datetime.h @@ -41,8 +41,10 @@ BEGINinterface(datetime) /* name must also be changed in ENDinterface macro! */ int (*formatTimestamp3339)(struct syslogTime *ts, char* pBuf); int (*formatTimestamp3164)(struct syslogTime *ts, char* pBuf); int (*formatTimestampSecFrac)(struct syslogTime *ts, char* pBuf); + /* v3, 2009-11-12 */ + time_t (*GetTime)(time_t *ttSeconds); ENDinterface(datetime) -#define datetimeCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */ +#define datetimeCURR_IF_VERSION 3 /* increment whenever you change the interface structure! */ /* interface changes: * 1 - initial version * 2 - not compatible to 1 - bugfix required ParseTIMESTAMP3164 to accept char ** as |