Project

General

Profile

Actions

Feature #8096

closed

introduce Time.current_timestamp

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

Status:
Feedback
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 3 (2 open1 closed)

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0