diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-14 22:31:59 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-14 22:31:59 +0000 |
commit | b810f0d545bdbb0d5d2db724e2fea1ca6aa89529 (patch) | |
tree | 8c0ef21a5ac47e4dc5d1bd14530820933ed61976 | |
parent | 303fcdd6b22d793a2a861d9d0fe4883847c1d2f5 (diff) | |
download | irssi-b810f0d545bdbb0d5d2db724e2fea1ca6aa89529.zip |
Don't waste time calculating timestamp differeces if the
timestamp_timeout is 0.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@349 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-common/core/printtext.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c index 7784b45d..9c96524a 100644 --- a/src/fe-common/core/printtext.c +++ b/src/fe-common/core/printtext.c @@ -651,12 +651,14 @@ static char *get_timestamp(TEXT_DEST_REC *dest) if (!show_timestamp(dest->level)) return NULL; - t = time(NULL); + if (timestamp_timeout > 0) { + t = time(NULL); - diff = t - dest->window->last_timestamp; - dest->window->last_timestamp = t; - if (diff < timestamp_timeout) - return NULL; + diff = t - dest->window->last_timestamp; + dest->window->last_timestamp = t; + if (diff < timestamp_timeout) + return NULL; + } tm = localtime(&t); return output_format_text(dest, IRCTXT_TIMESTAMP, |