~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_pthread.h

  • Committer: Brian Aker
  • Date: 2010-10-22 17:44:34 UTC
  • mto: This revision was merged to the branch mainline in revision 1873.
  • Revision ID: brian@tangent.org-20101022174434-q8fjovcpclzqer7n
TableShare is no longer in the house (i.e. we no longer directly have a copy
of it in cursor).

One more bit of the knot now gone.

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
}