forked from mia/Aegisub
Add struct tm which mimics the struct on unix. Also setup the types file into seperate namespaces for clarity. The corrosponding change to windows/utils.cpp snuck into r4437.
Originally committed to SVN as r4438.
This commit is contained in:
parent
1a7052040a
commit
2d9eee4ea9
1 changed files with 32 additions and 4 deletions
|
@ -24,12 +24,40 @@
|
|||
#pragma once
|
||||
|
||||
namespace agi {
|
||||
namespace type {
|
||||
|
||||
#if defined(_WIN32)
|
||||
namespace win {
|
||||
typedef struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
long tv_sec; ///< seconds
|
||||
long tv_usec; ///< microseconds
|
||||
} timeval;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct tm {
|
||||
int tm_sec; ///< seconds (0-59)
|
||||
int tm_min; ///< minutes (0-59)
|
||||
int tm_hour; ///< hours (0-23)
|
||||
int tm_mday; ///< day of the month (1-31)
|
||||
int tm_mon; ///< months since january (0-11)
|
||||
int tm_year; ///< years since 1900
|
||||
int tm_wday; ///< day of the week since sunday (0-6)
|
||||
int tm_yday; ///< days since january 1 (0-365)
|
||||
int tm_isdst; ///< whether in DST or not
|
||||
long tm_gmtoff; ///< GMT offset in seconds
|
||||
char *tm_zone; ///< TZ abrivation
|
||||
} tm;
|
||||
|
||||
} // namespace win
|
||||
|
||||
|
||||
|
||||
|
||||
namespace unix {
|
||||
} // namespace unix
|
||||
|
||||
namespace osx {
|
||||
} // namespace osx
|
||||
|
||||
|
||||
} // namespace type
|
||||
} // namespace agi
|
||||
|
|
Loading…
Reference in a new issue