Project

General

Profile

Actions

Feature #8096

open

introduce Time.current_timestamp

Added by vipulnsward (Vipul Amler) over 8 years ago. Updated about 8 years ago.

Status:
Feedback
Priority:
Normal
Target version:
[ruby-core:53412]

Description

=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


Related issues

Related to Ruby master - Feature #8658: Process.clock_gettimeClosed07/19/2013Actions
Related to CommonRuby - Feature #8640: Add Time#elapsed to return nanoseconds since creationOpen07/16/2013Actions
Related to Ruby master - Feature #12173: `Time#till_now`OpenActions
Actions

Also available in: Atom PDF