mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -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"
|
||||
else
|
||||
proc.call do
|
||||
start = Time.now
|
||||
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
||||
STDERR.puts "#{start} Compressing: #{file}"
|
||||
|
||||
# We can specify some files to never minify
|
||||
@ -196,7 +196,7 @@ task 'assets:precompile' => 'assets:precompile:before' do
|
||||
gzip(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
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user