~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_pthread.h

  • Committer: Lee Bieber
  • Date: 2010-11-14 05:18:07 UTC
  • mfrom: (1921.4.12 catalogs)
  • Revision ID: kalebral@gmail.com-20101114051807-p69h40jbsn1byf84
Merge Brian - add execute with no return

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include <unistd.h>
22
22
 
23
 
#include <boost/date_time.hpp>
24
 
 
25
23
#ifndef ETIME
26
24
#define ETIME ETIMEDOUT                         /* For FreeBSD */
27
25
#endif
72
70
#ifndef set_timespec_nsec
73
71
#define set_timespec_nsec(ABSTIME,NSEC) \
74
72
{\
75
 
  boost::posix_time::ptime mytime(boost::posix_time::microsec_clock::local_time());\
76
 
  boost::posix_time::ptime epoch(boost::gregorian::date(1970,1,1));\
77
 
  uint64_t t_mark= (mytime-epoch).total_microseconds();\
78
 
  uint64_t now= t_mark + (NSEC/100); \
 
73
  uint64_t now= my_getsystime() + (NSEC/100); \
79
74
  (ABSTIME).tv_sec=  (time_t) (now / 10000000UL);                  \
80
75
  (ABSTIME).tv_nsec= (long) (now % 10000000UL * 100 + ((NSEC) % 100)); \
81
76
}