Ruby: include/ruby/internal/intern/time.h Source File

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

time.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_TIME_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_TIME_H
23#include "ruby/internal/config.h"
24
25#ifdef HAVE_TIME_H
26# include <time.h> /* for time_t */
27#endif
28
29#include "ruby/internal/dllexport.h"
30#include "ruby/internal/value.h"
31
32 RBIMPL_SYMBOL_EXPORT_BEGIN()
33
34struct timespec;
35struct timeval;
36
37/* time.c */
38void rb_timespec_now(struct timespec *);
39 VALUE rb_time_new(time_t, long);
40 VALUE rb_time_nano_new(time_t, long);
41 VALUE rb_time_timespec_new(const struct timespec *, int);
42 VALUE rb_time_num_new(VALUE, VALUE);
43struct timeval rb_time_interval(VALUE num);
44struct timeval rb_time_timeval(VALUE time);
45struct timespec rb_time_timespec(VALUE time);
46struct timespec rb_time_timespec_interval(VALUE num);
47 VALUE rb_time_utc_offset(VALUE time);
48
49 RBIMPL_SYMBOL_EXPORT_END()
50
51#endif /* RBIMPL_INTERN_TIME_H */
dllexport.h
Tewaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
num
big_t * num
Definition: enough.c:232
config.h
Thin wrapper to ruby/config.h.
rb_time_num_new
VALUE rb_time_num_new(VALUE, VALUE)
Definition: time.c:2568
rb_time_new
VALUE rb_time_new(time_t, long)
Definition: time.c:2507
rb_time_timespec
struct timespec rb_time_timespec(VALUE time)
Definition: time.c:2707
rb_time_timeval
struct timeval rb_time_timeval(VALUE time)
Definition: time.c:2690
rb_time_interval
struct timeval rb_time_interval(VALUE num)
Definition: time.c:2684
rb_time_nano_new
VALUE rb_time_nano_new(time_t, long)
Definition: time.c:2534
rb_time_utc_offset
VALUE rb_time_utc_offset(VALUE time)
Definition: time.c:4801
rb_time_timespec_interval
struct timespec rb_time_timespec_interval(VALUE num)
Definition: time.c:2721
rb_time_timespec_new
VALUE rb_time_timespec_new(const struct timespec *, int)
Returns a time object with UTC/localtime/fixed offset.
Definition: time.c:2545
rb_timespec_now
void rb_timespec_now(struct timespec *)
Definition: time.c:1889
const
#define const
Definition: strftime.c:108
timespec
Definition: missing.h:62
timeval
Definition: missing.h:51
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38