iofunc_mount_set_time()

Updated: April 19, 2023

Set the timestamp resolution for iofunc functions and structures

Synopsis:

#include <sys/iofunc.h>

int iofunc_mount_set_time ( IOFUNC_MOUNT_T * const mountp,
                            const uint32_t timeres );

Arguments:

mountp
A pointer to the mount structure (typically a iofunc_mount_t structure) that is associated with the resmgr_attach() function and for which you want to set the time resolution.
timeres
The resolution for the resource manager's timestamps in nanoseconds. Valid values are from 1 to UINT32_MAX.
For example, if the resource manager uses a timestamp resolution of 100 ms, specify 100000000 (100 million nanoseconds). If it uses a 50-microsecond timestamp, specify 50000.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The iofunc_mount_set_time() function specifies the timestamp resolution of the iofunc subsystem.

This is useful when you save timestamps to NTFS, which stores timestamps in millseconds only. (The POSIX standard requires timestamps of open files to use the same resolution as the file system.)

Returns:

0, or -1 if an error occurred (errno is set).

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes