If I were to get a "coding assignment", I would tell them 'no'
So I would spend 0 minutes
And not just because I am not especially close to a 'coding' or 'developer' role in my IT career
But because they are all* a complete and utter waste of time
Unless you mean a whiteboarding session in an in-person interview, where you see approaches to problem solving, swags in the direction of an answer, refinement of the problem statement, etc - those I spend 15-20m on (out of the 45-60m interview session)
---------
* maybe there is a coding assignment that is not a waste of time, but I have never in my well over 20 years in IT seen it