diff --git a/src/graphomotor/features/time.py b/src/graphomotor/features/time.py new file mode 100644 index 0000000..c51d02c --- /dev/null +++ b/src/graphomotor/features/time.py @@ -0,0 +1,15 @@ +"""Feature extraction module for time-based metrics in spiral drawing data.""" + +from graphomotor.core import models + + +def get_task_duration(spiral: models.Spiral) -> dict: + """Calculate the total duration of a spiral drawing task. + + Args: + spiral: Spiral object containing drawing data. + + Returns: + Dictionary containing the total duration of the task in seconds. + """ + return {"duration": spiral.data["seconds"].iloc[-1]}