Can someone help me with qsort problem, I would like to use the inbuilt qsort function? I have a struct like this:

typedef struct{
int hours;
int minutes;
int seconds;
}Times;

I have calculated the times in a global struct table
Times TotalTimes[10];

How do I sort them by checking first hours, then minutes and finally seconds?
All values are given as two-digit decimal numbers.

Please help me out, I tried several different cases but I can't sort all numbers (hours, mins, secs) correctly.

I think the syntax of qsort is something like:
qsort(inputArray,numberOfCharsToCompare
,charTableLength,strcmp);