This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Convert nanoseconds to a timespec structure
#include <time.h> void nsec2timespec( struct timespec *timespec_p, _uint64 nsec );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
This function converts the given number of nanoseconds, nsec, into seconds and nanoseconds, and stores them in the timespec structure pointed to by timespec_p.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |