#NEWLINE# def _SleepTime( self , total , limit , duration ) : #NEWLINE# #INDENT# 'Calculate the time to sleep on a throttle.\n\n    Args:\n      total: The total amount transferred.\n      limit: The amount per second that is allowed to be sent.\n      duration: The amount of time taken to send the total.\n\n    Returns:\n      A float for the amount of time to sleep.\n    ' #NEWLINE# if ( not self ) : #NEWLINE# #INDENT# return 0.0 #NEWLINE# #UNINDENT# return max ( 0.0 , ( ( total / limit ) - duration ) )