Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_cTime. More...
#include "ruby/internal/config.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
Go to the source code of this file.
Functions | |
void | rb_timespec_now (struct timespec *) |
VALUE | rb_time_new (time_t, long) |
VALUE | rb_time_nano_new (time_t, long) |
VALUE | rb_time_timespec_new (const struct timespec *, int) |
Returns a time object with UTC/localtime/fixed offset. More... | |
VALUE | rb_time_num_new (VALUE, VALUE) |
struct timeval | rb_time_interval (VALUE num) |
struct timeval | rb_time_timeval (VALUE time) |
struct timespec | rb_time_timespec (VALUE time) |
struct timespec | rb_time_timespec_interval (VALUE num) |
VALUE | rb_time_utc_offset (VALUE time) |
Public APIs related to rb_cTime.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file time.h.
Definition at line 2684 of file time.c.
Referenced by rb_io_wait(), and rb_mutex_sleep().
Definition at line 2507 of file time.c.
References NDIV, rb_cTime, rb_eRangeError, and rb_raise().
Returns a time object with UTC/localtime/fixed offset.
offset is -86400 < fixoff < 86400 or INT_MAX (localtime) or INT_MAX-1 (utc)
Definition at line 2545 of file time.c.
References GetTimeval, INT2FIX, rb_cTime, rb_eArgError, rb_raise(), timespec::tv_nsec, timespec::tv_sec, TZMODE_SET_FIXOFF, and TZMODE_SET_UTC.
Definition at line 2690 of file time.c.
References FALSE, GetTimeval, IsTimeval, t, timespec::tv_nsec, timespec::tv_sec, TYPEOF_TIMEVAL_TV_SEC, and TYPEOF_TIMEVAL_TV_USEC.
Referenced by rb_thread_sleep().
Definition at line 4801 of file time.c.
References GetTimeval, INT2FIX, MAKE_TM, and TZMODE_UTC_P.
Referenced by Init_Time().
void rb_timespec_now | ( | struct timespec * | ts | ) |
Definition at line 1889 of file time.c.
References clock_gettime(), CLOCK_REALTIME, gettimeofday(), rb_sys_fail(), timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.