Parses a time expression into seconds.

**Supported formats:**
- `SS(.fff)` — seconds
- `MM:SS(.fff)` — minutes and seconds
- `HH:MM:SS(.fff)` — hours, minutes, and seconds

**Returns:**  
A number representing total seconds, or `NaN` if the input is invalid.
