Running xfce4-panel-4.8.6-1.fc15.x86_64 on Fedora 15 with a digital clock displayed in the panel, default %R time format (i.e. HH:MM format). When I resume my laptop after suspend, the panel clock displays the wrong time (i.e. the system time when I previously suspended) and does not update for up to a minute. I think this is because when the clock does not display seconds, its logic requests a glib timeout approximately every 60 seconds, regardless of whether there was a suspend in the previous minute or not. One hack would be to always request a glib timeout every second, regardless of whether seconds are being displayed or not -- this minimises the window where the wrong time is displayed. Alternatively, somehow detecting a resume and automatically updating the clock as a one-off event immediately afterwards could be a "neater" solution although perhaps significantly harder to do.
Indeed, the timeout first syncs to the real time and then only updates when required to save power. We could monitor the d-bus suspend/hibernate event, but we're overhauling that atm in master. Not very high prio for me.
Signal could be send by xfce4-power-manager (currently only a method, but it is easy to add a signal for power events too). Interface name is org.xfce.Power.Manager.
This bug happens also when you change the clock with the command 'date' for example :/
That something we cannot detect that easily. But how often do you adjust the system time, ntp does that for you ;-).
perhaps the plugin could update the clock in two different conditions: - on battery -> update the clock as less as possible depending on the format - on AC -> lookup the time every second
PS: default should be to update as less as possible, in case it's impossible to guess if power usage is on battery or AC
Pushed a branch to use realtime posix timers, these should work properly after suspend. Can someone give it a shot? http://git.xfce.org/xfce/xfce4-panel/commit/?h=nick/clockrealtime
Tested by Mike as well and it resolves the suspend problems and also time updates (ntpdate) from time to time ;-).