Mercurial > pidgin
changeset 13658:788580688610
[gaim-migrate @ 16060]
We can pass 0 for the idle time to gaim_presence_set_idle() if 'idle' is FALSE, skipping a needless call to time()
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Tue, 18 Apr 2006 21:16:45 +0000 |
parents | f9b24d282c91 |
children | a92263b13380 |
files | plugins/idle.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/idle.c Tue Apr 18 21:15:56 2006 +0000 +++ b/plugins/idle.c Tue Apr 18 21:16:45 2006 +0000 @@ -72,7 +72,10 @@ "setting idle time for %s to %d\n", gaim_account_get_username(acct), mins_idle); - t = time(NULL) - (60 * mins_idle); /* subtract seconds idle from current time */ + if (mins_idle) + t = time(NULL) - (60 * mins_idle); /* subtract seconds idle from current time */ + else + t = 0; /* time idle is irrelevant */ gaim_presence_set_idle(presence, mins_idle ? TRUE : FALSE, t); }