I have been using the function onUpdate to handle all the UI update.
The onUpdate, calls all my function to update the UI, but the seconds will only update if I get an event(ex. when steps increase, minutes shifts and a key event.)
function setSecond(dc)
{
dc.clear();
dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_BLACK);
//Set and show the current time
var clockTime = Sys.getClockTime();
var timeSecString = Lang.format("$1$", [zeroBeforeValue(clockTime.sec)]);
//var timeSecString = Lang.format("$1$", [clockTime.sec.format("%.2d")]);
dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_TRANSPARENT);
dc.drawText(165, 40, Gfx.FONT_LARGE, timeSecString, Gfx.TEXT_JUSTIFY_LEFT);
}
I have triede to force an update using, UI.requestupdate() in the end of onUpdate (this worked), but in got into a BAD loop. :(
Hope someone could help me here.