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
CoMISo
Base
Commits
aac93c52
Commit
aac93c52
authored
Nov 05, 2015
by
Martin Marinov
Browse files
Merged the research branch into ReForm. No behaviour changes.
[git-p4: depot-paths = "//ReForm/ReForm/main/Base/": change = 13190]
parent
af998d8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Debug/DebStream.cc
View file @
aac93c52
...
...
@@ -23,6 +23,12 @@
#include
<list>
#include
<map>
#include
<sstream>
#include
<cstring>
#include
<time.h>
#ifndef WIN32
#define sprintf_s snprintf
#endif
namespace
{
// LOCAL_PROC
bool
is_html_filename
(
const
char
*
const
str
)
...
...
@@ -515,7 +521,8 @@ public:
time_t
rawtime
;
time
(
&
rawtime
);
struct
tm
timeinfo
;
errno_t
err
=
localtime_s
(
&
timeinfo
,
&
rawtime
);
#ifdef WIN32
int
err
=
localtime_s
(
&
timeinfo
,
&
rawtime
);
if
(
err
==
0
)
{
char
buffer
[
256
];
...
...
@@ -526,6 +533,12 @@ public:
return
true
;
}
}
#else//WIN32
//TODO: Implement a secure version of this code for Linux, OSX
//timeinfo = *localtime(&rawtime);
//char* buffer = asctime(&timeinfo);
str
.
append
(
"TODO: add_time()"
);
#endif//WIN32
return
false
;
}
...
...
Utils/StopWatch.cc
View file @
aac93c52
...
...
@@ -66,7 +66,7 @@ namespace Base {
class
StopWatch
::
Impl
{
public:
StopWatch
()
Impl
()
{
starttime_
.
tv_sec
=
starttime_
.
tv_usec
=
0
;
endtime_
.
tv_sec
=
endtime_
.
tv_usec
=
0
;
...
...
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