github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/timer.h (about) 1 /* 2 Copyright (C) 2003 GraphicsMagick Group 3 Copyright (C) 2002 ImageMagick Studio 4 5 This program is covered by multiple licenses, which are described in 6 Copyright.txt. You should have received a copy of Copyright.txt with this 7 package; otherwise see http://www.graphicsmagick.org/www/Copyright.html. 8 9 ImageMagick Timer Methods. 10 */ 11 #ifndef _MAGICK_TIMER_H 12 #define _MAGICK_TIMER_H 13 14 #if defined(__cplusplus) || defined(c_plusplus) 15 extern "C" { 16 #endif 17 18 /* 19 Enum declarations. 20 */ 21 typedef enum 22 { 23 UndefinedTimerState, 24 StoppedTimerState, 25 RunningTimerState 26 } TimerState; 27 28 /* 29 Typedef declarations. 30 */ 31 typedef struct _Timer 32 { 33 double 34 start, 35 stop, 36 total; 37 } Timer; 38 39 typedef struct _TimerInfo 40 { 41 Timer 42 user, 43 elapsed; 44 45 TimerState 46 state; 47 48 unsigned long 49 signature; 50 } TimerInfo; 51 52 /* 53 Timer methods. 54 */ 55 extern MagickExport double 56 GetElapsedTime(TimerInfo *), 57 GetUserTime(TimerInfo *), 58 GetTimerResolution(void); 59 60 extern MagickExport unsigned int 61 ContinueTimer(TimerInfo *); 62 63 extern MagickExport void 64 GetTimerInfo(TimerInfo *), 65 ResetTimer(TimerInfo *), 66 StartTimer(TimerInfo *time_info,const unsigned int reset), 67 StopTimer(TimerInfo *time_info); 68 69 #if defined(__cplusplus) || defined(c_plusplus) 70 } 71 #endif 72 73 #endif 74 75 /* 76 * Local Variables: 77 * mode: c 78 * c-basic-offset: 2 79 * fill-column: 78 80 * End: 81 */