The world's most popular open source database
00001 /* Copyright (C) 2003 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 #ifndef NDB_TICK_H 00018 #define NDB_TICK_H 00019 00020 #include <ndb_types.h> 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 #if defined NDB_OSE || defined NDB_SOFTOSE 00027 typedef unsigned long NDB_TICKS; 00028 #else 00029 typedef Uint64 NDB_TICKS; 00030 #endif 00031 00035 NDB_TICKS NdbTick_CurrentMillisecond(void); 00036 00043 int NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros); 00044 00045 /*#define TIME_MEASUREMENT*/ 00046 #ifdef TIME_MEASUREMENT 00047 00048 struct MicroSecondTimer { 00049 NDB_TICKS seconds; 00050 NDB_TICKS micro_seconds; 00051 }; 00052 00059 NDB_TICKS NdbTick_getMicrosPassed(struct MicroSecondTimer start, 00060 struct MicroSecondTimer stop); 00061 int NdbTick_getMicroTimer(struct MicroSecondTimer* time_now); 00062 #endif 00063 00064 #ifdef __cplusplus 00065 } 00066 #endif 00067 00068 #endif 00069
1.4.7

