<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_time(self):
        '''get time, using ATTITUDE.time_boot_ms if in SITL with SIM_SPEEDUP != 1'''
        systime = time.time() - self.mpstate.start_time_s
        if not self.mpstate.is_sitl:
            return systime
        try:
            speedup = int(self.get_mav_param('SIM_SPEEDUP',1))
        except Exception:
            return systime
        if speedup != 1:
            return self.mpstate.attitude_time_s
        return systime