Set Job:ExpectedEndTime when erasing a device
authorDavid Zeuthen <zeuthen@gmail.com>
Tue, 26 Jun 2012 23:32:48 +0000 (19:32 -0400)
committerDavid Zeuthen <zeuthen@gmail.com>
Tue, 26 Jun 2012 23:36:36 +0000 (19:36 -0400)
commitb47a7e75cdb4297bfd727b2d09de7ec7d93e869d
tree5facff951921a0c477354f1efe09ac589351db0e
parent8b0060a1781fffe3a3115180622e7e5f115cf644
Set Job:ExpectedEndTime when erasing a device

Do this by introducing some plumbing in UDisksBaseJob to estimate the
end time based on the UDisksJob:progress property. We do this by using
a 100-period moving average (actually, up to 100 periods). Works out
great in practice.

Also switch the format of the time used on the org.fd.UDisks.Job
interface to be micro-seconds instead of seconds. This is not really a
break as these properties were always zero in any released udisks2
version.

http://people.freedesktop.org/~david/gnome-disks-estimated-time-remaining.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
data/org.freedesktop.UDisks2.xml
src/udisksbasejob.c
src/udisksbasejob.h
src/udiskslinuxblock.c