iofunc_time_update()

Updated: April 19, 2023

Update time stamps

Synopsis:

#include <sys/iofunc.h>

int iofunc_time_update( iofunc_attr_t* attr );

Arguments:

attr
A pointer to the iofunc_attr_t structure that describes the characteristics of the device that's associated with your resource manager.

Library:

libc

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

Description:

The iofunc_time_update() function examines the flags member in the passed attr structure against the bits IOFUNC_ATTR_ATIME, IOFUNC_ATTR_MTIME, and IOFUNC_ATTR_CTIME. If any of these bits are set, the corresponding time member of attr (e.g. attr->atime) isn't valid. This function updates all invalid attr members to the current time. In QNX Neutrino 7.0 or later, this function updates the nanosecond-resolution fields as well, if IOFUNC_ATTR_NS_TIMESTAMPS is set in the attribute's flags.

If iofunc_time_update() makes any change to the attr structure's time members, it sets IOFUNC_ATTR_DIRTY_TIME in the attr structure's flags member. This function always clears the IOFUNC_ATTR_ATIME, IOFUNC_ATTR_MTIME, and IOFUNC_ATTR_CTIME bits from attr->flags.

Returns:

EOK
Successful completion.

Classification:

QNX Neutrino

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