how to show time performance for merge sort? : <p>show the time performance analysis for merge sort algorithm in c programming
how to print merge sort algorithm the time performance (in ms) in c programming. 
Merge sort time complexity is (n log n) whether the condition in the worst case or best case. Someone can help me solve the problem. thanks, someone for solving my problem. </p>

<pre><code>#include&lt;stdio.h&gt;
#define MAX 50

void mergeSort(int arr[],int low,int mid,int high);
void partition(int arr[],int low,int high);

int main(){

    int merge[MAX],i,n;

    printf("Enter the total number of elements: ");
    scanf("%d",&amp;n);

    printf("Enter the elements which to be sort: ");
    for(i=0;i&lt;n;i++){
         scanf("%d",&amp;merge[i]);
    }

    partition(merge,0,n-1);

    printf("After merge sorting elements are: ");
    for(i=0;i&lt;n;i++){
         printf("%d ",merge[i]);
    }

   return 0;
}

void partition(int arr[],int low,int high){

    int mid;

    if(low&lt;high){
         mid=(low+high)/2;
         partition(arr,low,mid);
         partition(arr,mid+1,high);
         mergeSort(arr,low,mid,high);
    }

}

void mergeSort(int arr[],int low,int mid,int high){

    int i,m,k,l,temp[MAX];

    l=low;
    i=low;
    m=mid+1;

    while((l&lt;=mid)&amp;&amp;(m&lt;=high)){

         if(arr[l]&lt;=arr[m]){
             temp[i]=arr[l];
             l++;
         }
         else{
             temp[i]=arr[m];
             m++;
         }
         i++;
    }

    if(l&gt;mid){
         for(k=m;k&lt;=high;k++){
             temp[i]=arr[k];
             i++;
         }
    }
    else{
         for(k=l;k&lt;=mid;k++){
             temp[i]=arr[k];
             i++;
         }
    }

    for(k=low;k&lt;=high;k++){
         arr[k]=temp[k];
    }
}
</code></pre>
