Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Achim Morschhauser
GeomagLogger
Commits
38a25f41
Commit
38a25f41
authored
Dec 30, 2021
by
Achim Morschhauser
Browse files
Fix writing of milliseconds in output file
parent
b291ed76
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/String_Parser.cpp
View file @
38a25f41
...
...
@@ -131,10 +131,10 @@ int String_Parser::string(std::string &string, data_obs *data) {
break
;
case
'M'
:
{
// Get number of characters to write
int
len
=
snprintf
(
c
,
1
,
sel
.
c_str
(),
data
->
get_msec
());
int
len
=
snprintf
(
c
,
1
,
sel
.
c_str
(),
data
->
get_msec
()
/
1e6
);
// Write the milliseconds
char
buffer
[
len
+
1
]
=
""
;
snprintf
(
buffer
,
len
+
1
,
sel
.
c_str
(),
data
->
get_msec
());
snprintf
(
buffer
,
len
+
1
,
sel
.
c_str
(),
data
->
get_msec
()
/
1e6
);
os
<<
buffer
;
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment