[ARCHIVE ANSWER]
Yes. They must tell you why you are not free to leave. Police are allowed to detain you as long as they are actively seeking and/or gaining evidence and can explain why they believe detaining you will produce more evidence. For instance, I kept some motorist tied up for 10 to 12 hours as I removed their auto to a station with a lift, so I could drop the
fuel tank to check for drugs.
I could explain it was necessary because I could articulate the reasons why I was doing it: The driver was traveling on major highway. The stories of the driver and passenger did not match. There was a K-9 alert. Plus, there was an odor of marijuana. I could also explain why the lengthy detention might lead to evidence: My training taught me
marijuana is often hidden in fuel tanks.
During the search, I am not allowed to eat a Big Mac and then return to search more. I must actively be seeking the evidence. If an officer meets the criteria, he can keep you there until whenever.