Skip to content

Instantly share code, notes, and snippets.

@kotp
kotp / time_with_microseconds.rb
Last active August 29, 2015 14:17
Result of refactoring other code, uses time library and features a proc.
require 'time'
get_time = ->(t) { [t.iso8601, t.usec] }
report = 'something to report with a detailed time: %s'
puts report % get_time[Time.now]