~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_sleep.c

Removed dead variable, sorted authors file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
/* Wait a given number of microseconds */
17
17
 
18
18
#include "mysys_priv.h"
19
 
#include <mystrings/m_string.h>
 
19
#include <m_string.h>
20
20
 
21
 
void my_sleep(uint32_t m_seconds)
 
21
void my_sleep(ulong m_seconds)
22
22
{
23
23
#if defined(HAVE_SELECT)
24
24
  struct timeval t;
26
26
  t.tv_usec= m_seconds % 1000000L;
27
27
  select(0,0,0,0,&t); /* sleep */
28
28
#else
29
 
  uint32_t sec=    (uint) (m_seconds / 1000000L);
30
 
  uint32_t start= (uint32_t) time((time_t*) 0);
31
 
  while ((uint32_t) time((time_t*) 0) < start+sec);
 
29
  uint sec=    (uint) (m_seconds / 1000000L);
 
30
  ulong start= (ulong) time((time_t*) 0);
 
31
  while ((ulong) time((time_t*) 0) < start+sec);
32
32
#endif
33
33
}