aboutsummaryrefslogtreecommitdiffstats
path: root/time.c
Commit message (Collapse)AuthorAgeFilesLines
* * time.c: less bignum allocations.akr2010-03-311-141/+266
| | | | | | | | | * strftime.c (rb_strftime_timespec): defined to avoid rational for nano second resolution time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (timew2timespec): fix previous change.akr2010-03-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (wdivmod): renamed from wdivmodv. fix neg/pos and pos/neg.akr2010-03-301-31/+76
| | | | | | | | | | (split_second): return number of seconds as wideval_t. (timet2wv): new function. (wv2timet): new function. (timet2wideval): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: use more polymorphic operations.akr2010-03-301-24/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: reorder wide value implementation.akr2010-03-301-103/+104
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: make wide value more polymorphic.akr2010-03-301-100/+102
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix previous commit for LP64.akr2010-03-301-2/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (w2v): renamed from w2xv.akr2010-03-301-89/+97
| | | | | | | | | (v2w): renamed from xv2w. (rb_time_magnify): takes wideval_t. (rb_time_unmagnify): returns wideval_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-03-301-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: wide value condition changed.akr2010-03-291-122/+128
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_time_magnify): fix for LP64.akr2010-03-281-2/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: rename small integer specialization related identifiers.akr2010-03-281-158/+158
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (weq): optimize for small integer.akr2010-03-271-12/+84
| | | | | | | | | | | | | | | (wne): ditto. (wlt): ditto. (wgt): ditto. (wle): ditto. (wge): ditto. (rb_time_magnify): ditto. (rb_time_unmagnify): ditto. (rb_time_unmagnify_to_float): new function to avoid rational for Time#to_f and Time#-. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (mul): condition refined.akr2010-03-271-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: fix previos commit.akr2010-03-271-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: use 64bit arithmetic even on platforms with 32bit VALUE.akr2010-03-271-142/+477
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_round): new method Time#round. [ruby-dev:40595]akr2010-03-111-0/+60
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_add): propagate fixed time offset.akr2010-02-151-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mdump, time_mload): dump/load utc_offset.nobu2010-02-031-3/+23
| | | | | | | [ruby-dev:40063] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (quo, time_mdump): use RRATIONAL().nobu2010-02-031-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add comment.akr2010-02-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mload): add submicro into vtm.subsecx. [ruby-dev:40133] akr2010-01-221-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_to_r): convert to rational if internal representationakr2010-01-131-1/+6
| | | | | | | is not rational. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2010-01-131-0/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mdump): use nano_num and nano_den instead of subnano toakr2010-01-131-18/+32
| | | | | | | | | avoid Rational class in marshaled data which prevent unmarshal by Ruby 1.8. (time_mload): use nano_num and nano_den. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (num_exact): should not accept strings as operands, evenmatz2009-12-041-2/+5
| | | | | | | | though they respond to #to_r. ideally, strict rational conversion should be done by a method like #to_rational, not #to_r. [ruby-core:23729] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * removed spaces just before tabs.nobu2009-11-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: rdoc for <=>, casecmpmarcandre2009-10-281-1/+1
| | | | | | | | | | | | * bignum.c: rdoc for <=> * file.c: ditto * time.c: ditto * compar.c: rdoc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_time_succ): make Time#succ obsolete since time is notmatz2009-09-301-7/+6
| | | | | | | | | | a discrete value. * range.c (discrete_object_p): treat time objects specially to determine discrete values, since time objects have #succ yet are discrete (for now at least). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: fixed type.nobu2009-09-231-51/+52
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mdump): error message refined.akr2009-09-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_time_timeval, rb_time_timespec): typed.nobu2009-09-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_data_type): typed.nobu2009-09-091-10/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (find_time_t): use mktime for the first guess.akr2009-08-301-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (add): shortcut implemented for fixnums.akr2009-08-301-9/+27
| | | | | | | | (sub): ditto. (mul): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (eq): apply RTEST.akr2009-08-301-6/+40
| | | | | | | | | | | (ne): ditto. (add): avoid method dispatch for bignums. (sub): ditto. (mul): ditto. (mod): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * timev.h (TIME_SCALE): defined as 1000000000.akr2009-08-291-145/+164
| | | | | | | | | | | | | (struct vtm): subsec is replaced by subsecx. subsec * TIME_SCALE == subsecx. * time.c: avoid rational in most cases. (struct time_object): timev is replaced by timexv. timev * TIME_SCALE == timexv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (init_leap_second_info): use TIMET_MAX.akr2009-08-291-11/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (init_leap_second_info): checks the result of gmtime tonobu2009-07-221-0/+1
| | | | | | | suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_timespec): rounds subsecond toward zero.nobu2009-07-121-12/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (find_time_t): fix Time.local(2009,2,31) failure on 64bitakr2009-07-051-10/+58
| | | | | | | time_t environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (find_time_t): less number of guesses for hh:mm:60.akr2009-07-031-2/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (find_time_t): time guess strategy refined again.akr2009-07-021-115/+45
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress a warning.akr2009-07-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (find_time_t): time guess strategy refined.akr2009-07-021-109/+140
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (num_exact): rb_check_to_integer() can deal with both ofnobu2009-07-011-5/+2
| | | | | | | Fixnum and Bignum together. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (num_exact): use to_r for T_FLOAT.akr2009-07-011-48/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (quo): return an integer if possible.akr2009-07-011-1/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unused variable removed.akr2009-07-011-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e