@property
def duration(self):
    'Calculate trial duration. Return microseconds'
    if self.finish:
        return int(((self.finish - self.start).total_seconds() * 1000000))
    return 0
Calculate trial duration. Return microseconds
@property
def duration(self):
    
    if self.finish:
        return int(((self.finish - self.start).total_seconds() * 1000000))
    return 0