timev.h

Go to the documentation of this file.
00001 #ifndef RUBY_TIMEV_H
00002 #define RUBY_TIMEV_H
00003 
00004 struct vtm {
00005     VALUE year; /* 2000 for example.  Integer. */
00006     int mon; /* 1..12 */
00007     int mday; /* 1..31 */
00008     int hour; /* 0..23 */
00009     int min; /* 0..59 */
00010     int sec; /* 0..60 */
00011     VALUE subsecx; /* 0 <= subsecx < TIME_SCALE.  possibly Rational. */
00012     VALUE utc_offset; /* -3600 as -01:00 for example.  possibly Rational. */
00013     int wday; /* 0:Sunday, 1:Monday, ..., 6:Saturday */
00014     int yday; /* 1..366 */
00015     int isdst; /* 0:StandardTime 1:DayLightSavingTime */
00016     const char *zone; /* "JST", "EST", "EDT", etc. */
00017 };
00018 
00019 #define TIME_SCALE 1000000000
00020 
00021 #ifndef TYPEOF_TIMEVAL_TV_SEC
00022 # define TYPEOF_TIMEVAL_TV_SEC time_t
00023 #endif
00024 #ifndef TYPEOF_TIMEVAL_TV_USEC
00025 # if INT_MAX >= 1000000
00026 # define TYPEOF_TIMEVAL_TV_USEC int
00027 # else
00028 # define TYPEOF_TIMEVAL_TV_USEC long
00029 # endif
00030 #endif
00031 
00032 #if SIZEOF_TIME_T == SIZEOF_LONG
00033 typedef unsigned long unsigned_time_t;
00034 #elif SIZEOF_TIME_T == SIZEOF_INT
00035 typedef unsigned int unsigned_time_t;
00036 #elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
00037 typedef unsigned LONG_LONG unsigned_time_t;
00038 #else
00039 # error cannot find integer type which size is same as time_t.
00040 #endif
00041 
00042 #endif
00043 

Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7