77 <<
"Example 2: Which is the time of the last sample?\n" 81 cout <<
" We have a time series that starts with a first sample at:\n";
82 std::string startstring(
"2000/12/20 22:34:53.241");
83 cout <<
" " << startstring << endl;
86 <<
" We create an absolute time for the first sample:\n";
88 cout <<
" " << string(starttime) << endl;
91 <<
" The sampling interval of the time series is:\n";
93 cout <<
" " << string(interval) << endl;
96 <<
" The total series has " << nsamples <<
" samples" 97 <<
" with " << nsamples-1 <<
" intervals.\n" 98 <<
" That is a time span of:\n";
99 timespan=interval*(nsamples-1);
100 cout <<
" " << string(timespan) << endl;
103 <<
" Hence the last sample was taken at:\n" 104 <<
" " << string(starttime+timespan) << endl;
106 cout <<
" You'd like a more advanced one?\n";
class to contain relative times
class to contain absolute times