application/davcontroller.c

changeset 91
7ee944cf53de
parent 89
2fbb3cac05a5
child 93
5ee236155955
equal deleted inserted replaced
90:f501f0efc9a8 91:7ee944cf53de
1105 } 1105 }
1106 1106
1107 void dav_resourceviewer_destroy(DavResourceViewer *res) { 1107 void dav_resourceviewer_destroy(DavResourceViewer *res) {
1108 1108
1109 } 1109 }
1110
1111
1112 uint64_t dav_transfer_speed(TransferProgress *progress, time_t current) {
1113 size_t bytes = progress->transferred_bytes - progress->speedtest_bytes;
1114 time_t t = current - progress->speedtest_start;
1115
1116 progress->speedtest_start = current;
1117 progress->speedtest_bytes = progress->transferred_bytes;
1118
1119 return bytes/t;
1120 }

mercurial