You will have to check whether in your particular embedded system, sleep(1) will sleep the system for 1 second. In many of the embedded boards I have used, sleep takes the argument in milliseconds. So for 1 second sleep you would have to use sleep(1000).
If you are not too worried about accuracy then yes you can use this method. however, this will not be as accurate as you using a timer or an RTC. so for example if you want your system to do something when seconds reaches 30, a better way might be to setup a timer or an RTC alarm (based on what your embedded platform has) to more accurately measure out that time.