pobrn / mktorrent

A simple command line utility to create BitTorrent metainfo files
Other
472 stars 73 forks source link

Replace usleep() usage with nanosleep() #51

Closed rmsacks closed 3 years ago

rmsacks commented 4 years ago

usleep() was declared obsolete in POSIX.1-2001 and removed in POSIX.1-2008. Replace its usage with nanosleep().

uno20001 commented 4 years ago

Are you sure failing is the best option when nanosleep() fails?

rmsacks commented 4 years ago

Are you sure failing is the best option when nanosleep() fails?

My only reasoning for checking the error was to be safe. However, given its usage here and the fact that usleep()'s error was not checked before, I think that it should be fine without it.

pobrn commented 3 years ago

Thanks.