Skip to content

Commit

Permalink
moved call -uptime- to yast2 package
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Apr 1, 2016
1 parent 454e81f commit 1b21a7e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 6 additions & 0 deletions package/autoyast2.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Apr 1 14:34:14 CEST 2016 - schubi@suse.de

- Moved call "uptime" to yast2 package. Cleanup for bnc#956730.
- 3.1.120

-------------------------------------------------------------------
Thu Mar 10 08:33:33 UTC 2016 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Expand Up @@ -52,7 +52,7 @@ BuildRequires: systemd
Requires: autoyast2-installation = %{version}
Requires: libxslt
Requires: yast2
Requires: yast2 >= 2.16.36
Requires: yast2 >= 3.1.182
Requires: yast2-core
Requires: yast2-country >= 3.1.13
Requires: yast2-schema
Expand Down
15 changes: 5 additions & 10 deletions src/clients/inst_autoconfigure.rb
Expand Up @@ -7,6 +7,9 @@
# the system as described in the profile file.
#
# $Id$

require "yast2/system_time"

module Yast
class InstAutoconfigureClient < Client
include Yast::Logger
Expand Down Expand Up @@ -500,7 +503,7 @@ def wait_systemd_finished(max_wait, ser_ignore)
max_wait,
ser_ignore
)
st_time = uptime
st_time = Yast2::SystemTime.uptime
cur_time = st_time
last_busy = st_time
cmd = "systemctl --full list-jobs"
Expand All @@ -526,7 +529,7 @@ def wait_systemd_finished(max_wait, ser_ignore)
Builtins.y2milestone("size ll=%1 ll:%2", cnt, ll)
last_busy = cur_time if Ops.greater_than(cnt, 0)
Builtins.sleep(500)
cur_time = uptime
cur_time = Yast2::SystemTime.uptime
Builtins.y2milestone(
"wait_systemd_finished time:%1 idle:%2",
Ops.subtract(cur_time, st_time),
Expand All @@ -541,14 +544,6 @@ def wait_systemd_finished(max_wait, ser_ignore)
nil
end

private

# Determines the current uptime
#
# @return [Float] Current uptime in seconds
def uptime
Process.clock_gettime(Process::CLOCK_MONOTONIC)
end
end
end

Expand Down

0 comments on commit 1b21a7e

Please sign in to comment.