From: "naruse (Yui NARUSE)" Date: 2013-10-02T14:37:58+09:00 Subject: [ruby-core:57591] [CommonRuby - Feature #8096] introduce Time.current_timestamp Issue #8096 has been updated by naruse (Yui NARUSE). headius (Charles Nutter) wrote: > It would not be hard, given the guarantee that CLOCK_REALTIME works across platforms, to provide a #timestamp that is always CLOCK_REALTIME. > > Can we do that, so we have an official API? We can but whether is is official or not is matz's decision. Moreover Process.clock_gettime is different issue from this ticket. ---------------------------------------- Feature #8096: introduce Time.current_timestamp https://bugs.ruby-lang.org/issues/8096#change-42205 Author: vipulnsward (Vipul Amler) Status: Feedback Priority: Low Assignee: matz (Yukihiro Matsumoto) Category: Target version: Ruby 2.1.0 =begin A lot of scenarios and applications require the use of (({Time.now.to_i})) which is used as current_timestamp in systems. The introduction of (({Time.current_timestamp})) {or something with similar with different name} would provide implicit integer timestamp instead of going from (({Time.now})) -> time_object -> to_i -> integer timestamp value So instead of Time.now.to_i # Outputs => 1363274618 one could use Time.current_timestamp # Outputs => 1363274618 =end -- http://bugs.ruby-lang.org/