~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

  • Committer: Brian Aker
  • Date: 2011-01-08 10:35:13 UTC
  • mfrom: (2057.2.9 timestamp)
  • Revision ID: brian@tangent.org-20110108103513-3wuo8tsyajjcxjrg
Merge in fractional seconds to timestamp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1316
1316
  }
1317
1317
 
1318
1318
  // We may need to set user on this
1319
 
  int64_t getCurrentTimestampEpoch() const
1320
 
  { 
1321
 
    if (not _user_time.is_not_a_date_time())
1322
 
      return (_user_time - _epoch).total_seconds();
1323
 
 
 
1319
  time_t getCurrentTimestampEpoch() const
 
1320
  { 
 
1321
    if (not _user_time.is_not_a_date_time())
 
1322
      return (_user_time - _epoch).total_seconds();
 
1323
 
 
1324
    return (_start_timer - _epoch).total_seconds();
 
1325
  }
 
1326
 
 
1327
  time_t getCurrentTimestampEpoch(uint32_t &fraction_arg) const
 
1328
  { 
 
1329
    if (not _user_time.is_not_a_date_time())
 
1330
    {
 
1331
      fraction_arg= 0;
 
1332
      return (_user_time - _epoch).total_seconds();
 
1333
    }
 
1334
 
 
1335
    fraction_arg= _start_timer.time_of_day().fractional_seconds() % 1000000;
1324
1336
    return (_start_timer - _epoch).total_seconds();
1325
1337
  }
1326
1338