  function [err, errmsg] = OsiSetTime(t0)
%
% OsiSetTime.m				Set current simulation (integration) time in OLGA server.   
%
% The calling syntax is:
%
%   err = OsiSetTime(t0);
%
% Input:
%   T0:   New current time. 
%
%
% Copyright (c) 1998 by ABB Corporate Research.
% All Rights Reserved.
%
% $Revision: 1.0, 5/10-1998 by Kjetil Havre$ 

  if nargin ~= 1 
     errmsg = 'OsiSetTime usage: [err, errmsg] = OsiSetTime(t0);';
     disp(errmsg);
     err = -1;
     return
  end

  [m,n] = size(t0);
  if m*n ~= 1
     disp('OsiSetTime: using T0(1,1)');
  end

  [err, msg, ibody, rbody, errmsg] = osmi(1, 'OLGA_SET_TIME', [], t0(1,1), []);

  
