Ruby
2.1.10p492(2016-04-01revision54464)
Main Page
Modules
Data Structures
Files
File List
Globals
timev.h
Go to the documentation of this file.
1
#ifndef RUBY_TIMEV_H
2
#define RUBY_TIMEV_H
3
4
struct
vtm
{
5
VALUE
year
;
/* 2000 for example. Integer. */
6
int
mon
;
/* 1..12 */
7
int
mday
;
/* 1..31 */
8
int
hour
;
/* 0..23 */
9
int
min
;
/* 0..59 */
10
int
sec
;
/* 0..60 */
11
VALUE
subsecx
;
/* 0 <= subsecx < TIME_SCALE. possibly Rational. */
12
VALUE
utc_offset
;
/* -3600 as -01:00 for example. possibly Rational. */
13
int
wday
;
/* 0:Sunday, 1:Monday, ..., 6:Saturday */
14
int
yday
;
/* 1..366 */
15
int
isdst
;
/* 0:StandardTime 1:DayLightSavingTime */
16
const
char
*
zone
;
/* "JST", "EST", "EDT", etc. */
17
};
18
19
#define TIME_SCALE 1000000000
20
21
#ifndef TYPEOF_TIMEVAL_TV_SEC
22
# define TYPEOF_TIMEVAL_TV_SEC time_t
23
#endif
24
#ifndef TYPEOF_TIMEVAL_TV_USEC
25
# if INT_MAX >= 1000000
26
# define TYPEOF_TIMEVAL_TV_USEC int
27
# else
28
# define TYPEOF_TIMEVAL_TV_USEC long
29
# endif
30
#endif
31
32
#if SIZEOF_TIME_T == SIZEOF_LONG
33
typedef
unsigned
long
unsigned_time_t
;
34
#elif SIZEOF_TIME_T == SIZEOF_INT
35
typedef
unsigned
int
unsigned_time_t
;
36
#elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
37
typedef
unsigned
LONG_LONG
unsigned_time_t
;
38
#else
39
# error cannot find integer type which size is same as time_t.
40
#endif
41
42
#endif
vtm::yday
int yday
Definition:
timev.h:14
vtm::zone
const char * zone
Definition:
timev.h:16
vtm::year
VALUE year
Definition:
timev.h:5
vtm::subsecx
VALUE subsecx
Definition:
timev.h:11
vtm::min
int min
Definition:
timev.h:9
vtm
Definition:
timev.h:4
unsigned_time_t
unsigned long unsigned_time_t
Definition:
timev.h:33
vtm::utc_offset
VALUE utc_offset
Definition:
timev.h:12
vtm::mon
int mon
Definition:
timev.h:6
vtm::isdst
int isdst
Definition:
timev.h:15
vtm::hour
int hour
Definition:
timev.h:8
vtm::mday
int mday
Definition:
timev.h:7
vtm::sec
int sec
Definition:
timev.h:10
VALUE
unsigned long VALUE
Definition:
ripper.y:88
vtm::wday
int wday
Definition:
timev.h:13
Generated by
1.8.5