      real function secnds (x)

c  Simulation of VAX FORTRAN function which returns the system time in
c  seconds, minus the supplied value of x.
c  If time is less than 'x', then a day change is assumed

      integer*2 ihr, imin, isec, i100th

      call gettim (ihr, imin, isec, i100th)
      time = (ihr*60.+imin)*60.+isec+i100th/100.
      if (time .lt. x) time = time + 24*60*60
      secnds = time - x
      return
      end
