float tr_cpPercentDone( const tr_completion * cp ) { return tr_getRatio( cp->sizeNow, tr_cpSizeWhenDone( cp ) ); }
float tr_cpPercentComplete( const tr_completion * cp ) { return tr_getRatio( cp->sizeNow, cp->tor->info.totalSize ); }
static void updateRatio (tr_session_stats * setme) { setme->ratio = tr_getRatio (setme->uploadedBytes, setme->downloadedBytes); }