Sha256: a12618411feba4604ca2e522341a5ccd52dddfa017d18ef993707ab51f4a6b14

Contents?: true

Size: 1.75 KB

Versions: 12

Compression:

Stored size: 1.75 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
instance:@visibility:public:
@pathI"Time#to_f:EF:@parameters[:@files[[I"time.c;T0:@current_file_has_commentsF:
@name:	to_f:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"!Returns the value of <i>time</i> as a floating point number of
seconds since the Epoch.

   t = Time.now
   "%10.5f" % t.to_f   #=> "1270968744.77658"
   t.to_i              #=> 1270968744

Note that IEEE 754 double is not accurate enough to represent
number of nanoseconds from the Epoch.;F:@objectIu:YARD::StubProxyTime#to_f;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"	to_f;F;IC;";F;Iu;Time#to_f;F;0;[;[o:YARD::Tags::Tag
;I"return;F;I";F;0;[I"
Float;F;0:	@allI"@return [Float];F;[;Iu;Time#to_f;F; I"DReturns the value of <i>time</i> as a floating point number of
seconds since the Epoch.

   t = Time.now
   "%10.5f" % t.to_f   #=> "1270968744.77658"
   t.to_i              #=> 1270968744

Note that IEEE 754 double is not accurate enough to represent
number of nanoseconds from the Epoch.


@overload to_f
  @return [Float];F:@namespaceIu;	Time;F:@docstring_extra0:@sourceI"/*
 *  call-seq:
 *     time.to_f -> float
 *
 *  Returns the value of <i>time</i> as a floating point number of
 *  seconds since the Epoch.
 *
 *     t = Time.now
 *     "%10.5f" % t.to_f   #=> "1270968744.77658"
 *     t.to_i              #=> 1270968744
 *
 *  Note that IEEE 754 double is not accurate enough to represent
 *  number of nanoseconds from the Epoch.
 */

static VALUE
time_to_f(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    return rb_Float(rb_time_unmagnify_to_float(tobj->timew));
};F

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_19/objects/Time/to_f_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_19/objects/Time/to_f_i.dat