@@ -23,6 +23,7 @@ const EventEmitter = require('events');
2323
2424const ActionServerInterface = require ( '../lib/ActionServerInterface.js' ) ;
2525const GoalHandle = require ( './GoalHandle.js' ) ;
26+ const Time = require ( '../lib/Time.js' ) ;
2627
2728let GoalIdMsg = null ;
2829let GoalStatusMsg = null ;
@@ -185,28 +186,28 @@ class ActionServer extends EventEmitter {
185186
186187 publishResult ( status , result ) {
187188 const msg = this . _createMessage ( 'actionResult' , { status, result } ) ;
188- msg . header . stamp = timeUtils . now ( ) ;
189+ msg . header . stamp = Time . now ( ) ;
189190 msg . header . seq = this . _getAndIncrementSeq ( 'actionResult' ) ;
190191 this . _asInterface . publishResult ( msg ) ;
191192 this . publishStatus ( ) ;
192193 }
193194
194195 publishFeedback ( status , feedback ) {
195196 const msg = this . _createMessage ( 'actionFeedback' , { status, feedback } ) ;
196- msg . header . stamp = timeUtils . now ( ) ;
197+ msg . header . stamp = Time . now ( ) ;
197198 msg . header . seq = this . _getAndIncrementSeq ( 'actionFeedback' ) ;
198199 this . _asInterface . publishFeedback ( msg ) ;
199200 this . publishStatus ( ) ;
200201 }
201202
202203 publishStatus ( ) {
203204 const msg = new GoalStatusArrayMsg ( ) ;
204- msg . header . stamp = timeUtils . now ( ) ;
205+ msg . header . stamp = Time . now ( ) ;
205206 msg . header . seq = this . _getAndIncrementSeq ( 'status' ) ;
206207
207208 let goalsToRemove = new Set ( ) ;
208209
209- const now = timeUtils . toNumber ( timeUtils . now ( ) ) ;
210+ const now = timeUtils . toNumber ( Time . now ( ) ) ;
210211
211212 for ( let i = 0 , len = this . _goalHandleList . length ; i < len ; ++ i ) {
212213 const goalHandle = this . _goalHandleList [ i ] ;
0 commit comments