[Sugar-devel] Determining time since connection was established; traffic stats
sascha-ml-reply-to-2012-1 at silbe.org
Mon Jan 9 13:08:05 EST 2012
In Sugar, we're showing showing how long a GSM connection has been up as
well as how much traffic has been going over the link. This has been
contributed directly by a Sugar deployment, so I gather it's rather
important for their use case (probably ISPs charging by volume and / or
I'm currently investigating bugs  in the above support. Apart from
the traffic stats being completely gone in NM 0.9 (Gnome#661808 ),
the time is off as well. So far I assumed a simple calculation bug in
Sugar, but during recent tests using NM 0.9 the time was completely off,
rather than just a couple of hours as before (previous tests used NM 0.8
which we're still using in production).
The current Sugar code uses the connection.timestamp  settings
attribute to determine the start time of the connection and calculates
the connection time as the delta between current time and start time.
And I guess that's where our problem is: Besides probably not being set
yet when StateChanged(NM_DEVICE_STATE_ACTIVATED) fires, it's also
documented as getting periodically updated by "Settings services" (just
Is there any reliable way to determine the connection time
a) with NM 0.8 and
b) with NM 0.9?
Also, what's the chance of traffic stats coming back (in NM 0.9) within
the next few months?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: not available
More information about the Sugar-devel