diff --git a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx index b58bbaa29..48800d2fb 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -163,24 +163,18 @@ MasterPanelWindow :: resetTimer(void) throw () bool MasterPanelWindow :: onUpdateTime(int dummy) throw () { - Ptr::Ref sessionId = gLiveSupport->getSessionId(); + Ptr::Ref now = gLiveSupport->getScheduler() + ->getSchedulerTime(); + + if (now.get()) { + time_duration dayTime = now->time_of_day(); + // get the time of day, only up to a second precision + time_duration dayTimeSec(dayTime.hours(), + dayTime.minutes(), + dayTime.seconds(), + 0); - if (sessionId.get()) { - Ptr::Ref now = gLiveSupport->getScheduler() - ->getSchedulerTime(sessionId); - - if (now.get()) { - time_duration dayTime = now->time_of_day(); - // get the time of day, only up to a second precision - time_duration dayTimeSec(dayTime.hours(), - dayTime.minutes(), - dayTime.seconds(), - 0); - - timeWidget->set_text(to_simple_string(dayTimeSec)); - } - } else { - timeWidget->set_text("time"); + timeWidget->set_text(to_simple_string(dayTimeSec)); } return true; diff --git a/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx b/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx index 80b0dbea3..fd9f9e90e 100644 --- a/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx +++ b/livesupport/products/gLiveSupport/src/UiTestMainWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.9 $ + Version : $Revision: 1.10 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/Attic/UiTestMainWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -227,22 +227,18 @@ UiTestMainWindow :: onLoginButtonClicked (void) throw () bool UiTestMainWindow :: onUpdateTime(int dummy) throw () { - Ptr::Ref sessionId = gLiveSupport->getSessionId(); + Ptr::Ref now = gLiveSupport->getScheduler() + ->getSchedulerTime(); + + if (now.get()) { + time_duration dayTime = now->time_of_day(); + // get the time of day, only up to a second precision + time_duration dayTimeSec(dayTime.hours(), + dayTime.minutes(), + dayTime.seconds(), + 0); - if (sessionId.get()) { - Ptr::Ref now = gLiveSupport->getScheduler() - ->getSchedulerTime(sessionId); - - if (now.get()) { - time_duration dayTime = now->time_of_day(); - // get the time of day, only up to a second precision - time_duration dayTimeSec(dayTime.hours(), - dayTime.minutes(), - dayTime.seconds(), - 0); - - timeLabel->set_text(to_simple_string(dayTimeSec)); - } + timeLabel->set_text(to_simple_string(dayTimeSec)); } return true;