Sample Rate

I need to set the sample rate in the Arduino UNO board itself. And this is not my program, I found it, but it seems that it does not work