To measure the time for tokens between two activities in a Process Flow you can use milestone activities and a milestone collector.
Though calculating an idle percentage from lots of individual timings might be needlessly difficult (but I don't know the specifics of what you want to do, so it could also be the right approach).
Another tool you can use might zones. These track how many tokens are present in a section of the Process Flow at any time (and can also limit this number).
If the warehouse is idle while there are no tokens within certain sections of the Process Flow, you can place zones there and then only have to measure the durations for which there are no tokens present.
Here's an example model in which I track the times the zone is at different content levels. You could of course break this down further into two binary states: no content and any content.
zone-content-gantt-percentage-fm.fsm