%% Set Timer Object Properties Using Structure
% Construct a structure to modify several timer object properties.

s.BusyMode = 'queue';
s.ExecutionMode = 'fixedDelay';
s.ObjectVisibility = 'off'

%
% Create a timer, display the properties in s, modify the timer, display the new values of the properties, and delete the timer.

t = timer;
get(t,{'BusyMode','ExecutionMode','ObjectVisibility'})
set(t,s)
get(t,{'BusyMode','ExecutionMode','ObjectVisibility'})
delete(t)

% Copyright 2015 The MathWorks, Inc.