Mouseclicked question

Yes!

You did not provide much context so sharing enough to get you started.

Some references:

Setting the frameRate() may not always work depending on renderer and video card settings. That is another discussion.

Have fun!

Useful guides here as well:
Welcome to the Processing Foundation Discourse < The Asking Questions is a must read!

:)