Commit 5af67d4b44c87e08bb103f634caf328234237663
1 parent
fcb99fe7
Exists in
master
introduced fractional digit constant _TIME_FILE_FRACTIONAL_DIGITS_ in class Time
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
coolbot/util/coolbot_time.cpp
... | ... | @@ -193,7 +193,7 @@ namespace CoolBOT |
193 | 193 | |
194 | 194 | ostringstream stringStream; |
195 | 195 | stringStream.setf(ios::fixed); |
196 | - stringStream.precision(_MATLAB_SECONDS_FRACTIONAL_DIGITS_); | |
196 | + stringStream.precision(_TIME_FILE_FRACTIONAL_DIGITS_); | |
197 | 197 | stringStream<<dateBuf<<timeBuf<<seconds; |
198 | 198 | |
199 | 199 | return stringStream.str(); |
... | ... | @@ -290,7 +290,7 @@ namespace CoolBOT |
290 | 290 | |
291 | 291 | ostringstream stringStream; |
292 | 292 | stringStream.setf(ios::fixed); |
293 | - stringStream.precision(_MATLAB_SECONDS_FRACTIONAL_DIGITS_); | |
293 | + stringStream.precision(_TIME_FILE_FRACTIONAL_DIGITS_); | |
294 | 294 | stringStream<<_pCtime_R_Strftime_Bufffer_<<seconds; |
295 | 295 | |
296 | 296 | return stringStream.str(); | ... | ... |
coolbot/util/coolbot_time.h
... | ... | @@ -174,7 +174,8 @@ namespace CoolBOT |
174 | 174 | enum |
175 | 175 | { |
176 | 176 | _SECONDS_FRACTIONAL_DIGITS_=3, |
177 | - _MATLAB_SECONDS_FRACTIONAL_DIGITS_=6 | |
177 | + _MATLAB_SECONDS_FRACTIONAL_DIGITS_=6, | |
178 | + _TIME_FILE_FRACTIONAL_DIGITS_=3 | |
178 | 179 | }; |
179 | 180 | |
180 | 181 | _int64 _time_; |
... | ... | @@ -375,7 +376,8 @@ namespace CoolBOT |
375 | 376 | // ctime_r. According to the man pages should be at least 26 |
376 | 377 | _CTIME_R_STRFTIME_BUFFER_LENGTH_=64, |
377 | 378 | _SECONDS_FRACTIONAL_DIGITS_=3, |
378 | - _MATLAB_SECONDS_FRACTIONAL_DIGITS_=6 | |
379 | + _MATLAB_SECONDS_FRACTIONAL_DIGITS_=6, | |
380 | + _TIME_FILE_FRACTIONAL_DIGITS_=3 | |
379 | 381 | }; |
380 | 382 | |
381 | 383 | char _pCtime_R_Strftime_Bufffer_[_CTIME_R_STRFTIME_BUFFER_LENGTH_+1]; | ... | ... |