Browse Source

[2136] Assign and use intval earlier

Mukund Sivaraman 13 years ago
parent
commit
dde8b6049f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/bin/stats/stats.py.in

+ 2 - 2
src/bin/stats/stats.py.in

@@ -269,8 +269,8 @@ class Stats:
             while self.running:
             while self.running:
                 _check_command()
                 _check_command()
                 now = get_timestamp()
                 now = get_timestamp()
-                if self.get_interval() > 0 and now >= self.next_polltime:
-                    intval = self.get_interval()
+                intval = self.get_interval()
+                if intval > 0 and now >= self.next_polltime:
                     # decide the next polling timestamp
                     # decide the next polling timestamp
                     self.next_polltime += intval
                     self.next_polltime += intval
                     # adjust next time
                     # adjust next time