Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
3719b5dc
Commit
3719b5dc
authored
Jul 24, 2018
by
Michael Ott
Browse files
Add macros for ns to us,ms,s conversion
parent
25835b1e
Changes
1
Show whitespace changes
Inline
Side-by-side
include/timestamp.h
View file @
3719b5dc
...
@@ -14,6 +14,10 @@
...
@@ -14,6 +14,10 @@
#define S_TO_NS(x) x*1000000000ll
#define S_TO_NS(x) x*1000000000ll
#define MS_TO_NS(x) x*1000000ll
#define MS_TO_NS(x) x*1000000ll
#define US_TO_NS(x) x*1000ll
#define US_TO_NS(x) x*1000ll
#define NS_TO_US(x) x/1000ll
#define NS_TO_MS(x) x/1000000ll
#define NS_TO_S(x) x/1000000000ll
static
uint64_t
getTimestamp
()
{
static
uint64_t
getTimestamp
()
{
boost
::
posix_time
::
ptime
epoch
(
boost
::
gregorian
::
date
(
1970
,
1
,
1
));
boost
::
posix_time
::
ptime
epoch
(
boost
::
gregorian
::
date
(
1970
,
1
,
1
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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