When you click the attack button it affects only the sector you are in. So if you have guys beside that playing in another sector they will not engage.

The exception is, if you change status to at war with someone if you are sitting beside each other when you make the change they want attack but if new ships from either side fly in, they will engage.

Battle lengths vary. Depends on how many ships are in the battle when it happens. If it's something like 2 probes battle will be pretty much instant. If it's a probe against a Planet Killer, once again it's instant.