-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimtimer.h
More file actions
45 lines (33 loc) · 1.19 KB
/
simtimer.h
File metadata and controls
45 lines (33 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Program Information ////////////////////////////////////////////////////////
/**
* @file SimpleTimer.h
*
* @brief Header file for micro-second precision timer
*
* @author Michael Leverington
*
* @details Specifies all member methods of the SimpleTimer
*
* @version 2.00 (13 January 2017)
* 1.00 (11 September 2015)
*
* @Note None
*/
// Precompiler directives /////////////////////////////////////////////////////
#ifndef SIMTIMER_H
#define SIMTIMER_H
// Header files ///////////////////////////////////////////////////////////////
#include <sys/time.h>
#include <string.h>
#include <math.h>
#include "sim_main.h"
// Global Constants //////////////////////////////////////////////////////////
enum TIMER_CTRL_CODES { ZERO_TIMER, LAP_TIMER, STOP_TIMER };
extern const char RADIX_POINT;
// Function Prototyp /////////////////////////////////////////////////////////
void runTimer( int milliSeconds );
double accessTimer( int controlCode, char *timeStr );
double processTime( double startSec, double endSec,
double startUSec, double endUSec, char *timeStr );
void timeToString( int secTime, int uSecTime, char *timeStr );
#endif // ifndef SIMTIMER_H