mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
No need to have a get_runtime helper when many other options exist
This commit is contained in:
@ -24,7 +24,7 @@ def print_family(mobject: Mobject, n_tabs: int = 0) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def index_labels(
|
def index_labels(
|
||||||
mobject: Mobject | np.ndarray,
|
mobject: Mobject,
|
||||||
label_height: float = 0.15
|
label_height: float = 0.15
|
||||||
) -> VGroup:
|
) -> VGroup:
|
||||||
labels = VGroup()
|
labels = VGroup()
|
||||||
@ -35,9 +35,3 @@ def index_labels(
|
|||||||
label.set_stroke(BLACK, 5, background=True)
|
label.set_stroke(BLACK, 5, background=True)
|
||||||
labels.add(label)
|
labels.add(label)
|
||||||
return labels
|
return labels
|
||||||
|
|
||||||
|
|
||||||
def get_runtime(func: Callable) -> float:
|
|
||||||
now = time.time()
|
|
||||||
func()
|
|
||||||
return time.time() - now
|
|
||||||
|
Reference in New Issue
Block a user