RString FileTransfer::Update( float fDeltaTime ) { HTTPUpdate(); m_fLastUpdate += fDeltaTime; if (m_fLastUpdate >= 1.0) { if (m_bIsDownloading && m_bGotHeader) m_sStatus = ssprintf("DL @ %d KB/s", int((m_iDownloaded-m_bytesLastUpdate)/1024)); m_bytesLastUpdate = m_iDownloaded; UpdateProgress(); m_fLastUpdate = 0; } return m_sStatus; }
void ScreenPackages::Update( float fDeltaTime ) { HTTPUpdate(); m_fLastUpdate += fDeltaTime; if ( m_fLastUpdate >= 1.0 ) { if ( m_bIsDownloading && m_bGotHeader ) m_sStatus = ssprintf( "DL @ %d KB/s", int((m_iDownloaded-m_bytesLastUpdate)/1024) ); m_bytesLastUpdate = m_iDownloaded; UpdateProgress(); m_fLastUpdate = 0; } ScreenWithMenuElements::Update(fDeltaTime); }