2
* Copyright (C) 2011 Olaf van der Spek
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#include <boost/date_time.hpp>
19
#include <drizzled/common_fwd.h>
20
#include <drizzled/type/time.h>
25
class DRIZZLED_API Times
29
_epoch(boost::gregorian::date(1970, 1 ,1))
32
_connect_time = boost::posix_time::microsec_clock::universal_time();
36
uint64_t getConnectMicroseconds() const;
37
uint64_t getConnectSeconds() const;
40
void set_time(time_t); // This is done by a sys_var, as long as user_time is set, we will use that for all references to time
41
void set_time_after_lock();
42
void set_end_timer(Session&);
43
uint64_t getElapsedTime() const;
44
type::Time::epoch_t getCurrentTimestamp(bool actual= true) const;
45
type::Time::epoch_t getCurrentTimestampEpoch() const;
46
type::Time::epoch_t getCurrentTimestampEpoch(type::Time::usec_t& fraction_arg) const;
47
type::Time::epoch_t query_start();
48
boost::posix_time::ptime start_timer() const;
49
boost::posix_time::ptime epoch() const;
51
boost::posix_time::ptime _epoch;
52
boost::posix_time::ptime _connect_time;
53
boost::posix_time::ptime _end_timer;
54
boost::posix_time::ptime _user_time;
55
boost::posix_time::ptime _start_timer;
56
uint64_t utime_after_lock;