1 #ifndef RBIMPL_INTERN_TIME_H
2 #define RBIMPL_INTERN_TIME_H
23 #include "ruby/internal/config.h"
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
VALUE rb_time_nano_new(time_t sec, long nsec)
Identical to rb_time_new(), except it accepts the time in nanoseconds resolution.
void rb_timespec_now(struct timespec *ts)
Fills the current time into the given struct.
VALUE rb_time_timespec_new(const struct timespec *ts, int offset)
Creates an instance of rb_cTime, with given time and offset.
struct timespec rb_time_timespec(VALUE time)
Identical to rb_time_timeval(), except for return type.
VALUE rb_time_new(time_t sec, long usec)
Creates an instance of rb_cTime with the given time and the local timezone.
struct timeval rb_time_timeval(VALUE time)
Converts an instance of rb_cTime to a struct timeval that represents the identical point of time.
struct timeval rb_time_interval(VALUE num)
Creates a "time interval".
VALUE rb_time_num_new(VALUE timev, VALUE off)
Identical to rb_time_timespec_new(), except it takes Ruby values instead of C structs.
VALUE rb_time_utc_offset(VALUE time)
Queries the offset, in seconds between the time zone of the time and the UTC.
struct timespec rb_time_timespec_interval(VALUE num)
Identical to rb_time_interval(), except for return type.
int off
Offset inside of ptr.
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
uintptr_t VALUE
Type that represents a Ruby object.