#NEWLINE# def duration( self ) : #NEWLINE# #INDENT# '\n        Calculates how long the command has been running and writes a\n        readable duration to stdout.\n        ' #NEWLINE# duration = ( datetime . now ( ) - self . start_datetime ) #NEWLINE# self . stdout . write ( 'Duration: {}' . format ( str ( self ) ) )