subroutine nubeam_prev_timestep(ibsteps,ztbm1,ztbm2)

  !  return the most recent timestep as recorded in nbi_com
  !  note: if (0,0) are returned, either there is no prior step, or,
  !  the neutral beam internal state has not been reloaded.

  use nbi_com
  implicit none

  integer, intent(out) :: ibsteps  ! step counter.  0 means, no steps yet.
  real(fp), intent(out) :: ztbm1  ! start of most recent step (tbm1 in nbi_com).
  real(fp), intent(out) :: ztbm2  ! end of most recent step (tbm2 in nbi_com).

  !--------------------------

  ibsteps = nbsteps
  ztbm1 = tbm1
  ztbm2 = tbm2

end subroutine nubeam_prev_timestep
