* Added real_time_clock(), and real_time_clock_usecs().

* Added support for timespec stat times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31012 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-06-12 09:31:25 +00:00
parent 0d85a0853c
commit 4ab3fa3b5a
4 changed files with 45 additions and 19 deletions
@@ -1221,6 +1221,10 @@
#define st_size fssh_st_size
#define st_rdev fssh_st_rdev
#define st_blksize fssh_st_blksize
#define st_atim fssh_st_atim
#define st_mtim fssh_st_mtim
#define st_ctim fssh_st_ctim
#define st_crtim fssh_st_crtim
#define st_atime fssh_st_atime
#define st_mtime fssh_st_mtime
#define st_ctime fssh_st_ctime
+11 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008, Haiku Inc. All Rights Reserved.
* Copyright 2002-2009, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FSSH_SYS_STAT_H_
@@ -20,10 +20,10 @@ struct fssh_stat {
fssh_off_t fssh_st_size; /* size in bytes of this file */
fssh_dev_t fssh_st_rdev; /* device type (not used) */
fssh_size_t fssh_st_blksize; /* preferred block size for i/o */
fssh_time_t fssh_st_atime; /* last access time */
fssh_time_t fssh_st_mtime; /* last modification time */
fssh_time_t fssh_st_ctime; /* last change time, not creation time */
fssh_time_t fssh_st_crtime; /* creation time */
fssh_timespec fssh_st_atim; /* last access time */
fssh_timespec fssh_st_mtim; /* last modification time */
fssh_timespec fssh_st_ctim; /* last change time, not creation time */
fssh_timespec fssh_st_crtim; /* creation time */
// Haiku extensions:
// TODO: we might also define special types for files and TTYs
@@ -34,6 +34,12 @@ struct fssh_stat {
};
typedef struct fssh_stat fssh_struct_stat;
/* compatibility with older apps */
#define fssh_st_atime fssh_st_atim.tv_sec
#define fssh_st_mtime fssh_st_mtim.tv_sec
#define fssh_st_ctime fssh_st_ctim.tv_sec
#define fssh_st_crtime fssh_st_crtim.tv_sec
/* extended file types */
#define FSSH_S_ATTR_DIR 01000000000 /* attribute directory */
#define FSSH_S_ATTR 02000000000 /* attribute */