From 572a176d481c329b370ce52e7bec1a49ed76c225 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 1 Dec 2009 12:02:24 +0100 Subject: change time type from double to int64_t * grapher/Graph.hxx (Graph): Change variables holding the time limits of the displayed graph from double to int64_t. * grapher/Graph.cxx (Graph::draw): Do calculations of time differences using int64_t. (Graph::getExtents, Graph::setExtents): Change left and right arguments to int64_t. * grapher/GraphData.hxx (GraphDataBase): Change time type to int64_t. (GraphDataBase::elementAsString): New function. (GraphData::elementAsString): Implementation of that function. * grapher/StapParser.cxx (parseData): Parse time values from the stap script as 64 bit values. --- grapher/StapParser.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'grapher/StapParser.cxx') diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx index 9e42dab6..ddc14b2d 100644 --- a/grapher/StapParser.cxx +++ b/grapher/StapParser.cxx @@ -25,7 +25,7 @@ vector commaSplit(const boost::sub_range& range) } void StapParser::parseData(shared_ptr gdata, - double time, const string& dataString) + int64_t time, const string& dataString) { std::istringstream stream(dataString); shared_ptr > dblptr; @@ -182,7 +182,7 @@ vector commaSplit(const boost::sub_range& range) { vector tokens = commaSplit(dataString); int i = 0; - double time; + int64_t time; vector::iterator tokIter = tokens.begin(); std::istringstream timeStream(*tokIter++); timeStream >> time; @@ -196,7 +196,7 @@ vector commaSplit(const boost::sub_range& range) } else { - double time; + int64_t time; string data; stream >> time >> data; parseData(itr->second, time, data); -- cgit