1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

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
This commit is contained in:
Timo Sirainen 2000-06-14 22:31:59 +00:00 committed by cras
parent 303fcdd6b2
commit b810f0d545

View File

@ -651,12 +651,14 @@ static char *get_timestamp(TEXT_DEST_REC *dest)
if (!show_timestamp(dest->level)) if (!show_timestamp(dest->level))
return NULL; return NULL;
if (timestamp_timeout > 0) {
t = time(NULL); t = time(NULL);
diff = t - dest->window->last_timestamp; diff = t - dest->window->last_timestamp;
dest->window->last_timestamp = t; dest->window->last_timestamp = t;
if (diff < timestamp_timeout) if (diff < timestamp_timeout)
return NULL; return NULL;
}
tm = localtime(&t); tm = localtime(&t);
return output_format_text(dest, IRCTXT_TIMESTAMP, return output_format_text(dest, IRCTXT_TIMESTAMP,