virtop 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/virtop/libvirt/domain.rb +5 -5
  2. metadata +7 -7
@@ -30,12 +30,12 @@ module Libvirt
30
30
  end
31
31
 
32
32
  def cpu_time
33
- t = self.info.cpu_time / 10**7 / 60
33
+ t = self.info.cpu_time / 10**9
34
34
 
35
- d = ( t / 100 / 60 / 24 ).to_s
36
- h = ( t / 100 / 60 % 24 ).to_s
37
- m = ( t / 100 % 60 ).to_s
38
- s = ( t % 100 ).to_s # TODO this value is not correct
35
+ s = ( t % 60 ).to_s
36
+ m = ( t / 60 % 60 ).to_s
37
+ h = ( t / 60 / 60 % 24 ).to_s
38
+ d = ( t / 60 / 60 / 24 % 365 ).to_s
39
39
 
40
40
  str = d != '0' ? d + '-' : ''
41
41
  str += h != '0' ? "%02i:" % h : ''
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtop
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - henning mueller
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-01 00:00:00 +02:00
18
+ date: 2010-06-04 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -44,10 +44,10 @@ extra_rdoc_files: []
44
44
 
45
45
  files:
46
46
  - bin/virtop
47
- - lib/virtop/letsexit.rb
48
- - lib/virtop/libvirt/domain.rb
49
- - lib/virtop/libvirt/connect.rb
50
47
  - lib/virtop.rb
48
+ - lib/virtop/libvirt/connect.rb
49
+ - lib/virtop/libvirt/domain.rb
50
+ - lib/virtop/letsexit.rb
51
51
  - README
52
52
  has_rdoc: true
53
53
  homepage: