5.118 Convert time to use seconds instead of milliseconds

Maple’s command Value(Time()) returns 13 digits number, which is number of milliseconds from epoch. I wanted this value to be in seconds, to match the file changed time from  FileTools[Status]("A.txt" ) which uses seconds and not milliseconds. I could not find an option to tell Date or Time to do this. Here is one way to do this.

r:=Value(Time());  #r := 1652677498870 
length(r);   #13 
r:=convert(r, base, 10); 
r:=ListTools:-Reverse(r); 
r:=r[1..-4]; #remove last 3 digits 
nops(r); 
r:=parse(cat(op(r)))  #r := 1652677498 
length(r); #10
 

This can be made into a function

get_time_in_seconds:=proc()::integer; 
local r; 
r:=Value(Time()); 
r:=convert(r, base, 10); 
r:=ListTools:-Reverse(r); 
r:=r[1..-4]; 
r:=parse(cat(op(r))); 
return r; 
end proc; 
 
get_time_in_seconds()  #1652679222