def update_status_to_cooking(self):
        """
        Updates the object state to *cooking* and sets the timer according to
        the object's `duration` property, relative to the current time.
        """

        self.state = self.STATE_COOKING
        self.write("Cooking")
        current_time = datetime.now()
        print(current_time)
        self.end_time = current_time + timedelta(minutes=self.duration)
        print(self.end_time)