You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the sustaining activity
Core Open MCT time api methods have been updated and the older ones will be deprecated in the future. We need to update usage in our code.
TimeAPI Method Updates
The following methods in OpenMCT's TimeAPI have been deprecated and should be updated to use their newer counterparts:
timeSystem(timeSystemOrKey, bounds) → Split into:
getTimeSystem()
setTimeSystem(timeSystemOrKey, bounds)
bounds(newBounds) → Split into:
getBounds()
setBounds(newBounds)
clockOffsets(offsets) → Split into:
getClockOffsets()
setClockOffsets(offsets)
clock(keyOrClock, offsets) → Split into:
getClock()
setClock(keyOrClock)
Note: Clock offsets are now set separately using setClockOffsets()
stopClock() → Replace with:
setMode(FIXED_MODE_KEY)
Example Code Update
// Old codeopenmct.time.timeSystem('utc',bounds);openmct.time.clock('local',offsets);// New codeopenmct.time.setTimeSystem('utc',bounds);openmct.time.setClock('local');openmct.time.setClockOffsets(offsets);
TimeAPI Event Updates
The following TimeAPI events have been deprecated and should be updated to use their newer counterparts:
Describe the sustaining activity
Core Open MCT time api methods have been updated and the older ones will be deprecated in the future. We need to update usage in our code.
TimeAPI Method Updates
The following methods in OpenMCT's TimeAPI have been deprecated and should be updated to use their newer counterparts:
timeSystem(timeSystemOrKey, bounds)
→ Split into:getTimeSystem()
setTimeSystem(timeSystemOrKey, bounds)
bounds(newBounds)
→ Split into:getBounds()
setBounds(newBounds)
clockOffsets(offsets)
→ Split into:getClockOffsets()
setClockOffsets(offsets)
clock(keyOrClock, offsets)
→ Split into:getClock()
setClock(keyOrClock)
setClockOffsets()
stopClock()
→ Replace with:setMode(FIXED_MODE_KEY)
Example Code Update
TimeAPI Event Updates
The following TimeAPI events have been deprecated and should be updated to use their newer counterparts:
'bounds'
→'boundsChanged'
'clock'
→'clockChanged'
'timeSystem'
→'timeSystemChanged'
'clockOffsets'
→'clockOffsetsChanged'
Additional Events
The following events remain unchanged or are new:
'tick'
- Emitted when a clock tick occurs'modeChanged'
- Emitted when the time mode changes (fixed vs. realtime)Expected behavior
Testing Instructions
1.
Additional context
The text was updated successfully, but these errors were encountered: