How to set a periodic callback?

Hi Beaglebone Black programmers.

I own a BBB, and would like to have a certain function to be called every N ms.

Is it possible to set in the BBB a periodic event, which on each expiration of it, a callback will be called?

Thank you.