How to format a time stamp in C <p>I'm trying to figure out how to get the current timestamp using the function below but I want to format it so that it displays the time like 4:30:23 on output. Eventually I want to subtract the time stamps before and after I run an algorithm.</p> <pre><code>struct timeval FindTime() { struct timeval tv; gettimeofday(&amp;tv,NULL); return tv; } int main() { printf("%ld\n",FindTime()); return0; } </code></pre> <p>Current output format: 1456178100</p>