mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
Prefer Process.clock_gettime
over Time.now
.
This commit is contained in:
parent
2bdc36bd8c
commit
77c293f82d
@ -182,7 +182,7 @@ task 'assets:precompile' => 'assets:precompile:before' do
|
|||||||
STDERR.puts "Skipping: #{file} already compressed"
|
STDERR.puts "Skipping: #{file} already compressed"
|
||||||
else
|
else
|
||||||
proc.call do
|
proc.call do
|
||||||
start = Time.now
|
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
||||||
STDERR.puts "#{start} Compressing: #{file}"
|
STDERR.puts "#{start} Compressing: #{file}"
|
||||||
|
|
||||||
# We can specify some files to never minify
|
# We can specify some files to never minify
|
||||||
@ -196,7 +196,7 @@ task 'assets:precompile' => 'assets:precompile:before' do
|
|||||||
gzip(path)
|
gzip(path)
|
||||||
brotli(path)
|
brotli(path)
|
||||||
|
|
||||||
STDERR.puts "Done compressing #{file} : #{(Time.now - start).round(2)} secs"
|
STDERR.puts "Done compressing #{file} : #{(Process.clock_gettime(Process::CLOCK_MONOTONIC) - start).round(2)} secs"
|
||||||
STDERR.puts
|
STDERR.puts
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user