~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/syslog/logging.cc

  • Committer: Brian Aker
  • Date: 2010-12-31 06:44:35 UTC
  • mfrom: (2040.4.3 timestamp)
  • Revision ID: brian@tangent.org-20101231064435-g0h53tjfisjty2fy
Partial update to the time code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
  if (session->examined_row_count < _threshold_big_examined)
78
78
    return false;
79
79
  
80
 
  /* TODO, the session object should have a "utime command completed"
81
 
     inside itself, so be more accurate, and so this doesnt have to
82
 
     keep calling current_utime, which can be slow */
83
 
  
84
 
  boost::posix_time::ptime mytime(boost::posix_time::microsec_clock::local_time());
85
 
  boost::posix_time::ptime epoch(boost::gregorian::date(1970,1,1));
86
 
  uint64_t t_mark= (mytime-epoch).total_microseconds();
 
80
  /*
 
81
    TODO, the session object should have a "utime command completed"
 
82
    inside itself, so be more accurate, and so this doesnt have to
 
83
    keep calling current_utime, which can be slow.
 
84
  */
 
85
  uint64_t t_mark= session->getCurrentTimestamp(false);
87
86
 
88
87
  // return if query was not too slow
89
88
  if ((t_mark - session->start_utime) < _threshold_slow)