classdef (Sealed) PlaybackControlsOneShotTimer < handle
    %PlaybackControlsOneShotTimer Singleton timer for playback controls
    %   Used by Simulink Playback Controls to refresh toolbar, menus, and
    %   status bar every second.
    
    %   Copyright 2015 The MathWorks, Inc.
    
    properties (SetAccess = private)
        Timer = [];
    end
    
    methods (Access = private)
        function this = PlaybackControlsOneShotTimer
            % The playback controls are refreshed every second when the
            % mouse is moved on top of the Scope window.
            this.Timer = scopesutil.OneShotTimer(1);
        end
    end
    
    methods (Static)
        function this = getInstance
            persistent localObj
            if isempty(localObj) || ~isvalid(localObj)
                localObj = uiscopes.PlaybackControlsOneShotTimer;
            end
            this = localObj;
        end
    end
    
end

