The datetime plugin updates once a second when the date only is shown and the time format includes seconds.
Reproduce as follows:
Configure the datetime plugin with a layout of "Date only" and a time format that includes seconds.
The date is displayed in the panel and the time is displayed in a tooltip.
Monitor the plugin with strace (and do not redirect its output to a file).
Move the cursor outside the panel (also, the panel should not have other plugins that do periodic updates).
strace shows system calls occurring once a second.
Reconfigure the plugin with a time format that does not include seconds and move the cursor outside the panel.
Now, strace shows system calls occurring once a minute.
The expected behavior is for the plugin to update once a minute unless seconds are currently being displayed in the plugin's button or tooltip.
$ ps -e | fgrep xfce4-panel
10438 pts/1 00:00:13 xfce4-panel
$ strace -p 10438 -ttt
Bug 4145 has a patch that includes a fix for this bug.
Indeed, I guess I introduced this problem with the new tooltips implementation.
Fixed in svn r4993, borrowing from your patch in Bug #4145. Thanks.
(In reply to comment #2)
> Fixed in svn r4993, borrowing from your patch in Bug #4145. Thanks.
Adding the function datetime_set_update_interval() is a good idea, however, it depends on *both* the layout and the date/time formats, so it needs to be called when either changes. You can verify using the strace method I outlined above.
BTW, this dual dependency was why I computed the update interval in datetime_update() (and factored out the timer handler into datetime_update1()).
Created attachment 1711
I'm too lazy to think right now, but I think this'll do the trick.
Committed that patch in r5007. Please re-reopen this bug if it is insufficient.