libs/libc/time: add stub for futimes/ns(2)

Change-Id: I231817d10b9e2071b1f642e8694839b2a64b1c4c
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2020-09-17 15:37:09 +08:00
committed by Xiang Xiao
parent 9db2e9e393
commit 0826b827ee
4 changed files with 120 additions and 0 deletions
+43
View File
@@ -386,6 +386,49 @@ int setitimer(int which, FAR const struct itimerval *value,
int utimes(FAR const char *path, const struct timeval times[2]);
/****************************************************************************
* Name: futimes
*
* Description:
* futimens() update the timestamps of a file with nanosecond precision.
* This contrasts with the historical utime(2) and utimes(2), which permit
* only second and microsecond precision, respectively, when setting file
* timestamps. With futimens() the file whose timestamps are to be updated
* is specified via an open file descriptor, fd.
*
* Input Parameters:
* fd - Specifies the fd to be modified
* times - Specifies the time value to set
*
* Returned Value:
* On success, futimens() return 0.
* On error, -1 is returned and errno is set to indicate the error.
*
****************************************************************************/
int futimes(int fd, const struct timeval tv[2]);
/****************************************************************************
* Name: futimes
*
* Description:
* futimens() update the timestamps of a file with nanosecond precision.
* This contrasts with the historical utime(2) and utimes(2), which permit
* only second and microsecond precision, respectively, when setting file
* timestamps.
*
* Input Parameters:
* fd - Specifies the fd to be modified
* times - Specifies the time value to set
*
* Returned Value:
* On success, futimens() return 0.
* On error, -1 is returned and errno is set to indicate the error.
*
****************************************************************************/
int futimens(int fd, const struct timespec times[2]);
/****************************************************************************
* Name: gethrtime
*