Subversion Repositories programming

Rev

Rev 86 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 86 Rev 87
Line 36... Line 36...
36
void stopclock (void)
36
void stopclock (void)
37
{
37
{
38
    gettimeofday(&end_time, NULL);
38
    gettimeofday(&end_time, NULL);
39
}
39
}
40
 
40
 
41
/* print the time taken, in milliseconds = seconds / 1000 */
41
/* print the time taken, in milliseconds = seconds/1000 */
42
void printtimetaken (char *funcname)
42
void printtimetaken (char *funcname)
43
{
43
{
44
    double total_usecs = (end_time.tv_sec-start_time.tv_sec) * 1000000.0
44
    double total_usecs = (end_time.tv_sec-start_time.tv_sec) * 1000000.0
45
                       + (end_time.tv_usec-start_time.tv_usec);
45
                       + (end_time.tv_usec-start_time.tv_usec);
46
 
46