FreeBASIC  0.91.0
hook_sleep.c
Go to the documentation of this file.
1 /* sleep function */
2 
3 #include "fb.h"
4 
5 /*:::::*/
6 FBCALL void fb_Sleep ( int msecs )
7 {
8  FB_SLEEPPROC sleepproc;
9  FB_LOCK();
10  sleepproc = __fb_ctx.hooks.sleepproc;
11  FB_UNLOCK();
12  if( sleepproc ) {
13  sleepproc( msecs );
14  } else {
15  fb_ConsoleSleep( msecs );
16  }
17 }
18