rather than use time values, use datetime() function to indicate a point in time. The difference of the values returned from the datetime() function will provide a duration in seconds that will present well with format mmss11.2
%let starting_at= %sysfunc( datetime(), 20.3) ;
* your long procedure follows ;
%let finishing_at = %sysfunc( datetime(), 20.3) ;
%put duration of long procedure was %sysfunc( range( &starting_at, &finishing_at), mmss11.2 ) ;
Demonstrated in this clip from a SASlog[pre]1 %let starting_at= %sysfunc( datetime(), 20.3) ;
2 * your long procedure follows ;
3 %put waiting %sysfunc( sleep(1234, .001 ));
waiting 0.001
4 %let finishing_at = %sysfunc( datetime(), 20.3) ;
5
6 %put duration of long procedure was %sysfunc( range( &starting_at, &finishing_at), mmss11.2 ) ;
duration of long procedure was 0:01.31[/pre]