FreeRDP
stopwatch.h
1 
20 #ifndef FREERDP_UTILS_STOPWATCH_H
21 #define FREERDP_UTILS_STOPWATCH_H
22 
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31  typedef struct
32  {
33  UINT64 start;
34  UINT64 end;
35  UINT64 elapsed;
36  UINT32 count;
37  } STOPWATCH;
38 
39  FREERDP_API STOPWATCH* stopwatch_create(void);
40  FREERDP_API void stopwatch_free(STOPWATCH* stopwatch);
41 
42  FREERDP_API void stopwatch_start(STOPWATCH* stopwatch);
43  FREERDP_API void stopwatch_stop(STOPWATCH* stopwatch);
44  FREERDP_API void stopwatch_reset(STOPWATCH* stopwatch);
45 
46  FREERDP_API double stopwatch_get_elapsed_time_in_seconds(STOPWATCH* stopwatch);
47  FREERDP_API void stopwatch_get_elapsed_time_in_useconds(STOPWATCH* stopwatch, UINT32* sec,
48  UINT32* usec);
49 
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 #endif /* FREERDP_UTILS_STOPWATCH_H */