As 'time' input doesn't have a [pattern] attribute, you can check its value with this RegExp.
You must provide hours and minutes. Seconds and milliseconds are optional.
To "activate" seconds on the input, give it the step="" attribute with a number reprensenting the incrementation in seconds.
To "activate" milliseconds on the input, set the step attribute to "0.001"