Hi,
FlowMonitor only tracks the statistics. It does not have any knowledge when one should start or stop.
You can create an event that you can trace in your traffic generator and sink.
For example, you can configure your generator to send X amount of data (that can be #packets for UDP, or MB in TCP) and monitor how much is generated.
When that X amount is reached, you can assume that the generation of flow is ended, and given the delay, the reception will be finished soon.
If you are using TCP traffic, you can potentially trace the control packets, FIN/FIN-ACK, that close the connection.
Regards,
K