Former-commit-id:a02aeb236c
[formerly9f19e3f712
] [formerly06a8b51d6d
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]] Former-commit-id:06a8b51d6d
Former-commit-id:3360eb6c5f
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
/*******************************************************************************
|
|
* FILENAME: CodeTimer.h
|
|
* ORIGINAL AUTHOR: Gautam Sood
|
|
* CREATION DATE: January 4, 2006
|
|
* DESCRIPTION: Contains the prototypes for the CodeTimer routines
|
|
* ORGANIZATION: OHD-11, HSEB, WHFS
|
|
* MACHINE: Redhat Linux
|
|
*
|
|
* MODIFICATION HISTORY:
|
|
* DATE PROGRAMMER DESCRIPTION/REASON
|
|
*
|
|
*
|
|
********************************************************************************
|
|
*/
|
|
|
|
#ifndef CODETIMER_H_
|
|
#define CODETIMER_H_
|
|
#include <sys/time.h>
|
|
|
|
typedef struct
|
|
{
|
|
int is_running;
|
|
struct timeval start_time;
|
|
struct timeval end_time;
|
|
double elapsed_time;
|
|
} codetimer;
|
|
|
|
void init_timer( codetimer *timer);
|
|
void start_timer( codetimer *timer );
|
|
double stop_timer( codetimer *timer );
|
|
void stop_timer_and_print_elapsed_time( codetimer *timer, char *message, FILE *filePtr );
|
|
void restart_timer( codetimer *timer );
|
|
double get_elapsed_time( codetimer *timer, int calculate );
|
|
void print_elapsed_time( codetimer *timer, char *message, FILE *filePtr );
|
|
double calculate_elapsed_time( codetimer *timer );
|
|
|
|
#endif /*CODE_TIMER_H_*/
|