summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-06-30 13:59:50 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-06-30 19:24:58 +0200
commite4fb1ca873f840acd1e0a72a6f266843f65854ae (patch)
treed388378c8116c76be0f0795e549d10a82bec749b /test
parent46d8e827d58417870243a5645c97adffc189303e (diff)
downloadconnman-e4fb1ca873f840acd1e0a72a6f266843f65854ae.tar.gz
connman-e4fb1ca873f840acd1e0a72a6f266843f65854ae.tar.bz2
connman-e4fb1ca873f840acd1e0a72a6f266843f65854ae.zip
Centralize rntl update timers
Instead of creating a new rntl trigger for each Counter object move this part to the rtnl core. Only one update trigger will be registered at RTNL. The minimum interval will used for the timeout callback.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-counter9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test-counter b/test/test-counter
index 6a42885e..70a30273 100755
--- a/test/test-counter
+++ b/test/test-counter
@@ -1,5 +1,6 @@
#!/usr/bin/python
+import sys
import gobject
import dbus
@@ -30,10 +31,14 @@ if __name__ == '__main__':
manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
'org.moblin.connman.Manager')
- path = "/test/counter"
+ interval = 2
+ if len(sys.argv) > 1:
+ interval = sys.argv[1]
+
+ path = "/test/counter%s" % interval
object = Counter(bus, path)
- manager.RegisterCounter(path, dbus.UInt32(2))
+ manager.RegisterCounter(path, dbus.UInt32(interval))
mainloop = gobject.MainLoop()
mainloop.run()