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/obj.c | |
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/obj.c')
-rw-r--r-- | runtime/obj.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/obj.c b/runtime/obj.c index 3692b957..45dac776 100644 --- a/runtime/obj.c +++ b/runtime/obj.c @@ -48,7 +48,7 @@ * * File begun on 2008-01-04 by RGerhards * - * Copyright 2008 Rainer Gerhards and Adiscon GmbH. + * Copyright 2008, 2009 Rainer Gerhards and Adiscon GmbH. * * This file is part of the rsyslog runtime library. * @@ -90,6 +90,7 @@ #include "cfsysline.h" #include "unicode-helper.h" #include "apc.h" +#include "datetime.h" /* static data */ DEFobjCurrIf(obj) /* we define our own interface, as this is expected by some macros! */ @@ -1330,8 +1331,9 @@ objClassInit(modInfo_t *pModInfo) CHKiRet(objGetObjInterface(&obj)); /* get ourselves ;) */ /* init classes we use (limit to as few as possible!) */ - CHKiRet(apcClassInit(pModInfo)); CHKiRet(errmsgClassInit(pModInfo)); + CHKiRet(datetimeClassInit(pModInfo)); + CHKiRet(apcClassInit(pModInfo)); CHKiRet(cfsyslineInit()); CHKiRet(varClassInit(pModInfo)); CHKiRet(moduleClassInit(pModInfo)); |