time.generate_random_events functional