$rand(N,M) can be used to return a random integer between N and M (inclusive). if you want to start a timer that triggers at a random time between now and, for example, 4:00PM of the current day you can use:
//timer 1 $rand(0, $calc($ctime(16:00 $date) - $ctime)) <command>