pro toc,message

common Tictoc, firsttic, lasttic
if n_elements(message) gt 0 then print,message
if n_elements(firsttic) eq 0 then begin
  tic
  return
end
thistoc=systime(/seconds)

print,"Elapsed time is ",thistoc-lasttic,"s"

if(lasttic ne firsttic) then begin
  print,"Total Elapsed Time is ",thistoc-firsttic,"s"
end

lasttic=thistoc

end