summaryrefslogtreecommitdiffstats
path: root/action.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-09-16 14:57:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-09-16 14:57:12 +0200
commitbcb97650683bbcb1ecdacd0c2a6052ef836d3eda (patch)
tree76b4f704b169398ddc10182c1348c731b0717cf4 /action.h
parent19ac72a36859ea267fbf4e2e640a5499c6276e07 (diff)
downloadrsyslog-bcb97650683bbcb1ecdacd0c2a6052ef836d3eda.tar.gz
rsyslog-bcb97650683bbcb1ecdacd0c2a6052ef836d3eda.tar.xz
rsyslog-bcb97650683bbcb1ecdacd0c2a6052ef836d3eda.zip
consolidated time() calls in rule engine
... but did not manage to avoid doing at least one call. So this change introduced performance benefit only in a few non-common situations. Anyhow, it hopefully levels ground for better things to come.
Diffstat (limited to 'action.h')
-rw-r--r--action.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/action.h b/action.h
index c910fc1c..d26d15b6 100644
--- a/action.h
+++ b/action.h
@@ -40,6 +40,8 @@ extern int glbliActionResumeRetryCount;
*/
struct action_s {
time_t f_time; /* used for "message repeated n times" - be careful, old, old code */
+ time_t tActNow; /* the current time for an action execution. Initially set to -1 and
+ populated on an as-needed basis. This is a performance optimization. */
time_t tLastExec; /* time this action was last executed */
int bExecWhenPrevSusp;/* execute only when previous action is suspended? */
int iSecsExecOnceInterval; /* if non-zero, minimum seconds to wait until action is executed again */
@@ -78,8 +80,6 @@ rsRetVal actionConstruct(action_t **ppThis);
rsRetVal actionConstructFinalize(action_t *pThis);
rsRetVal actionDestruct(action_t *pThis);
rsRetVal actionAddCfSysLineHdrl(void);
-rsRetVal actionTryResume(action_t *pThis);
-rsRetVal actionSuspend(action_t *pThis);
rsRetVal actionDbgPrint(action_t *pThis);
rsRetVal actionSetGlobalResumeInterval(int iNewVal);
rsRetVal actionDoAction(action_t *pAction);