posix: add timespec_is_valid() private internal function

Add a common private function timespec_is_valid() that
can be used to check if a timespec object is valid, and
use that consistently in lib/posix/options.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
8 files changed