libFirm 1.20
|
00001 /* 00002 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. 00003 * 00004 * This file is part of libFirm. 00005 * 00006 * This file may be distributed and/or modified under the terms of the 00007 * GNU General Public License version 2 as published by the Free Software 00008 * Foundation and appearing in the file LICENSE.GPL included in the 00009 * packaging of this file. 00010 * 00011 * Licensees holding valid libFirm Professional Edition licenses may use 00012 * this file in accordance with the libFirm Commercial License. 00013 * Agreement provided with the Software. 00014 * 00015 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 */ 00019 00024 #ifndef FIRM_TIMING_H 00025 #define FIRM_TIMING_H 00026 00027 #include <stdlib.h> 00028 00029 #include "begin.h" 00030 00037 typedef struct ir_timer_t ir_timer_t; 00038 00046 FIRM_API int ir_timer_enter_high_priority(void); 00047 00053 FIRM_API int ir_timer_leave_high_priority(void); 00054 00059 FIRM_API size_t ir_get_heap_used_bytes(void); 00060 00066 FIRM_API ir_timer_t *ir_timer_new(void); 00067 00072 FIRM_API void ir_timer_free(ir_timer_t *timer); 00073 00078 FIRM_API void ir_timer_start(ir_timer_t *timer); 00079 00084 FIRM_API void ir_timer_reset_and_start(ir_timer_t *timer); 00085 00090 FIRM_API void ir_timer_reset(ir_timer_t *timer); 00091 00097 FIRM_API void ir_timer_stop(ir_timer_t *timer); 00098 00106 FIRM_API int ir_timer_push(ir_timer_t *timer); 00107 00113 FIRM_API ir_timer_t *ir_timer_pop(void); 00114 00120 FIRM_API unsigned long ir_timer_elapsed_msec(const ir_timer_t *timer); 00121 00127 FIRM_API unsigned long ir_timer_elapsed_usec(const ir_timer_t *timer); 00128 00129 #include "end.h" 00130 00131 #endif