How to randomize the onset time of appearing object

I am a beginner in this so hence the basic question probably. I have
created two bars that make a cross on the screen:

rect=[500 500 510 550];
rect2=[480 520 530 530];
color=[255 255 255];
Screen('FillRect',w, color, rect);
Screen('FillRect',w, color, rect2);
Screen('Flip', w);

Now, I would like to randomize the onset time of these bars, let's
say, appear either 0.1, 0.3 & 0.5 secs (for example to measure which
appeared first) but I would like them to appear equally 3 times per
onset condition (meaning each bar would appear 9 times).
I'm not sure if and how I should use the rand (floor/ceil) function I
looked up from help..
Hope you can help me with this.

K.
Thank you for your help.
I tried it but it still just presented the two bars at the same time
for a moment. It didn't give any error report or anything. The general
idea that I want to do is, that I would like two objects to appear at
the same trial for different onset times. For example, if it would
become an experiment, the subject could respond which object appeared
first.
It would be also helpful to advise me, how, with just one object which
appears on the screen for 5 times the onset time is varied.
But with this, I'll just try again to figure it out, maybe I wrote
something in wrong.

greetings,
K