Mixmonitor for a limited time

Hi,
I need to record the next 5 seconds after i execute mixmonitor function in my dialplan. Is there any option i can use?
Asterisk 11
I appreciate help.