Ruby: internal/time.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

time.h
Go to the documentation of this file.
1#ifndef INTERNAL_TIME_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_TIME_H
12#include "ruby/internal/config.h" /* for SIGNEDNESS_OF_TIME_T */
13#include "internal/bits.h" /* for SIGNED_INTEGER_MAX */
14#include "ruby/ruby.h" /* for VALUE */
15
16#if SIGNEDNESS_OF_TIME_T < 0 /* signed */
17# define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
18# define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
19#elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
20# define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
21# define TIMET_MIN ((time_t)0)
22#endif
23
24struct timeval; /* <- in <sys/time.h> or <winsock2.h> */
25
26/* time.c */
27struct timeval rb_time_timeval(VALUE);
28
29RUBY_SYMBOL_EXPORT_BEGIN
30/* time.c (export) */
31void ruby_reset_leap_second_info(void);
32void ruby_reset_timezone(void);
33RUBY_SYMBOL_EXPORT_END
34
35#endif /* INTERNAL_TIME_H */
bits.h
Internal header for bitwise integer algorithms.
config.h
Thin wrapper to ruby/config.h.
ruby_reset_leap_second_info
void ruby_reset_leap_second_info(void)
Definition: time.c:1201
rb_time_timeval
struct timeval rb_time_timeval(VALUE)
Definition: time.c:2690
ruby_reset_timezone
void ruby_reset_timezone(void)
Definition: time.c:678
ruby.h
timeval
Definition: missing.h:51
VALUE
unsigned long VALUE
Definition: value.h:38