Hello digitup1,
It gives zero because the time taken to do quicksort function is so small. To test that your time function works right use some loops in your code to make time delay. For example like this...
long int c;
for(c=1;c<=100000;c++)
{cout<<" ";
}