Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/hype-library/include/core/time_measurement.hpp
Go to the documentation of this file.
00001 /***********************************************************************************************************
00002 Copyright (c) 2012, Sebastian Breß, Otto-von-Guericke University of Magdeburg, Germany. All rights reserved.
00003 
00004 This program and accompanying materials are made available under the terms of the 
00005 GNU LESSER GENERAL PUBLIC LICENSE - Version 3, http://www.gnu.org/licenses/lgpl-3.0.txt
00006 ***********************************************************************************************************/
00007 #pragma once
00008 
00009 #include <config/exports.hpp>
00010 
00011 #include <stdint.h>
00012 #include <vector>
00013 
00014 namespace hype{
00015         namespace core{
00016 
00017 
00018 class HYPE_EXPORT EstimatedTime{
00019 
00020         public:
00021         EstimatedTime();
00022         explicit EstimatedTime(double time_in_nanoseconds);
00023 
00024         double getTimeinNanoseconds() const;
00025 
00026         private:
00027          double value_in_nanoseconds_;
00028 
00029 }; 
00030 
00031 class HYPE_EXPORT MeasuredTime{
00032 
00033         public:
00034         MeasuredTime();
00035         explicit MeasuredTime(double time_in_nanoseconds);
00036 
00037         double getTimeinNanoseconds() const;
00038 
00039         private:
00040          double value_in_nanoseconds_;
00041 
00042 }; 
00043 
00044 typedef std::vector<double> Tuple;
00045 
00046 HYPE_EXPORT uint64_t getTimestamp();
00047 
00048 //uint64_t getTimestamp()
00049 //{
00050 //    timespec ts;
00051 //    //clock_gettime(CLOCK_REALTIME, &ts);
00052 //    //return (uint64_t)ts.tv_sec * 1000000LL + (uint64_t)ts.tv_nsec / 1000LL;
00053 //    clock_gettime(CLOCK_REALTIME, &ts);
00054 //       return (uint64_t)ts.tv_sec * 1000000000LL + (uint64_t)ts.tv_nsec;
00055 //}
00056 
00057         }; //end namespace core
00058 }; //end namespace hype
00059 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines