#NEWLINE# def _from_timestring( self , s ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# parts = s . split ( '.' ) #NEWLINE# base_time = time . strptime ( parts [ 0 ] , '%H:%M:%S' ) #NEWLINE# self . nanosecond_time = ( ( ( base_time . tm_hour * Time . HOUR ) + ( nano_time_str . tm_min * Time . MINUTE ) ) + ( base_time . tm_sec * Time . SECOND ) ) #NEWLINE# if ( len ( parts ) > 1 ) : #NEWLINE# #INDENT# nano_time_str = ( parts [ 1 ] + ( '0' * ( 9 - len ( parts [ 1 ] ) ) ) ) #NEWLINE# self . nanosecond_time += int ( nano_time_str ) #NEWLINE# #UNINDENT# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise ValueError ( ( "can't interpret %r as a time" % ( s , ) ) )