function _feedapi_update_rate in FeedAPI 5
Same name and namespace in other branches
- 6 feedapi.module \_feedapi_update_rate()
Calculate the average between-update time
1 call to _feedapi_update_rate()
- feedapi_admin_overview in ./
feedapi.module - Provide a UI for overviewing the existing feeds
File
- ./
feedapi.module, line 1375 - Handle the submodules (for feed and item processing) Provide a basic management of feeds
Code
function _feedapi_update_rate($update_times) {
for ($i = 0; $i < count($update_times) - 1; $i++) {
$between[] = abs($update_times[$i] - $update_times[$i + 1]);
}
return count($between) > 0 ? round(array_sum($between) / count($between), 2) : t('No data yet');
}