~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/ut0ut.h

  • Committer: Stewart Smith
  • Date: 2010-11-03 03:27:09 UTC
  • mto: (1902.1.1 build) (1910.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1903.
  • Revision ID: stewart@flamingspork.com-20101103032709-oyvfrc6eb8fzj0mr
fix docs warning: docs/unlock.rst:2: (WARNING/2) Title underline too short.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
19
19
 
20
20
You should have received a copy of the GNU General Public License along with
21
 
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22
 
Place, Suite 330, Boston, MA 02111-1307 USA
 
21
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
22
St, Fifth Floor, Boston, MA 02110-1301 USA
23
23
 
24
24
*****************************************************************************/
25
25
 
34
34
#define ut0ut_h
35
35
 
36
36
#include "univ.i"
 
37
 
 
38
#ifndef UNIV_HOTBACKUP
 
39
# include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */
 
40
#endif /* UNIV_HOTBACKUP */
 
41
 
37
42
#include <time.h>
38
43
#ifndef MYSQL_SERVER
39
44
#include <ctype.h>
47
52
/** Time stamp */
48
53
typedef time_t  ib_time_t;
49
54
 
50
 
#if defined(IB_HAVE_PAUSE_INSTRUCTION)
 
55
#ifndef UNIV_HOTBACKUP
 
56
#if defined(HAVE_IB_PAUSE_INSTRUCTION)
51
57
#  ifdef WIN32
52
58
     /* In the Win32 API, the x86 PAUSE instruction is executed by calling
53
59
     the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
84
90
                os_thread_sleep(2000 /* 2 ms */);               \
85
91
        }                                                       \
86
92
} while (0)
 
93
#endif /* !UNIV_HOTBACKUP */
87
94
 
88
95
/********************************************************//**
89
96
Gets the high 32 bits in a ulint. That is makes a shift >> 32,
216
223
ib_time_t
217
224
ut_time(void);
218
225
/*=========*/
 
226
#ifndef UNIV_HOTBACKUP
219
227
/**********************************************************//**
220
228
Returns system time.
221
229
Upon successful completion, the value 0 is returned; otherwise the
239
247
ut_time_us(
240
248
/*=======*/
241
249
        ullint* tloc);  /*!< out: us since epoch, if non-NULL */
 
250
/**********************************************************//**
 
251
Returns the number of milliseconds since some epoch.  The
 
252
value may wrap around.  It should only be used for heuristic
 
253
purposes.
 
254
@return ms since epoch */
 
255
UNIV_INTERN
 
256
ulint
 
257
ut_time_ms(void);
 
258
/*============*/
 
259
#endif /* !UNIV_HOTBACKUP */
242
260
 
243
261
/**********************************************************//**
244
262
Returns the difference of two times in seconds.