Skip to content

Commit

Permalink
Merge pull request #89 from waghanza/crystal_0.33
Browse files Browse the repository at this point in the history
Update to crystal 0.33
  • Loading branch information
tbrand authored Feb 17, 2020
2 parents 4b67c25 + 70fc906 commit 856971a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/neph/job/job.cr
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ module Neph
end

def time_msg : String
time = Time.now.to_s("%Y-%m-%d %H:%S:%M")
time = Time.local.to_s("%Y-%m-%d %H:%S:%M")
"[#{time}] "
end

Expand Down Expand Up @@ -270,15 +270,15 @@ module Neph
stdout = File.open("#{@log_dir}/#{log_out}", "w")
stderr = File.open("#{@log_dir}/#{log_err}", "w")

s = Time.now
s = Time.local

exec_commands(@before, stdout, stderr)
exec_commands(@commands, stdout, stderr)
exec_commands(@after, stdout, stderr)

@done_command += 1

e = Time.now
e = Time.local
@elapsed_time = format_time(e - s)
stdout.close
stderr.close
Expand Down
6 changes: 3 additions & 3 deletions src/neph/job/job_executor.cr
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ module Neph

def exec_parallel
channel = Channel(Nil).new
@start = Time.now
@start = Time.local

spawn do
@job.exec(channel)
end
end

def exec_sequential
@start = Time.now
@start = Time.local

spawn do
@job.exec
Expand Down Expand Up @@ -120,7 +120,7 @@ module Neph

def print_result
if start = @start
elapsed_time = format_time(Time.now - @start.as(Time))
elapsed_time = format_time(Time.local - @start.as(Time))
log_ln "\nFinished in #{elapsed_time}".colorize.mode(:bold).to_s
end
end
Expand Down

0 comments on commit 856971a

Please sign in to comment.