|
@@ -181,7 +181,7 @@ class Interval(): |
|
|
self.start += new_start |
|
|
self.start += new_start |
|
|
else: |
|
|
else: |
|
|
self.start = new_start |
|
|
self.start = new_start |
|
|
self.duration = self.end - self.start |
|
|
|
|
|
|
|
|
self.duration = round((self.end - self.start), self.DEFAUT_PRECISION) |
|
|
|
|
|
|
|
|
def move_end(self, new_end: float | int, relative: bool = False): |
|
|
def move_end(self, new_end: float | int, relative: bool = False): |
|
|
"""Update end time of Interval, keeping start time constant (& so modify duration)""" |
|
|
"""Update end time of Interval, keeping start time constant (& so modify duration)""" |
|
@@ -189,7 +189,7 @@ class Interval(): |
|
|
self.end += new_end |
|
|
self.end += new_end |
|
|
else: |
|
|
else: |
|
|
self.end = new_end |
|
|
self.end = new_end |
|
|
self.duration = self.end - self.start |
|
|
|
|
|
|
|
|
self.duration = round((self.end - self.start), self.DEFAUT_PRECISION) |
|
|
|
|
|
|
|
|
def update_duration(self, new_duration: float | int, relative: bool = False): |
|
|
def update_duration(self, new_duration: float | int, relative: bool = False): |
|
|
"""Update duration of Interval, keeping start time constant (& so modify end time)""" |
|
|
"""Update duration of Interval, keeping start time constant (& so modify end time)""" |
|
|