-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gimesketvirtadien's time requested changes #104
Conversation
…ker API" This reverts commit c9cee5d.
…imesketvirtadieni_upstream_time
…imesketvirtadieni_upstream_time
@gimesketvirtadieni, travis fails but I think that has to do with the compiler being too old. I will investigate that later. |
const size_t kIdentifierSize = 2; | ||
|
||
|
||
std::string fractional_to_string(size_t fractional, size_t cutOffDivider) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has to be moved to the .h/cpp so that it can be put under test
Hi I can see you merged milli/micro/nano sec functionality into a dedicated branch. Did I understand you correctly that you will make more refactoring of this functionality based on your comments above? Or do you want me to open one more pull request? |
Thanks. No it's OK. I would have taken care of it already but I've been burning the midnight oil lately with work for my company |
…w for OSX). Windows is still missing
@@ -52,7 +52,7 @@ ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | |||
set(CMAKE_CXX_FLAGS "-Wall -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD") | |||
ELSE() | |||
set(PLATFORM_LINK_LIBRIES rt) | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -rdynamic -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD") | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -rdynamic -Wunused -std=c++11 -pthread -lrt -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this change needed for clock_gettime?
…pression that is always true
…rieving fractional type
…nternal::time::GetFractional(..)
@@ -99,9 +99,12 @@ namespace g3 { | |||
ts->tv_sec = now.tv_sec; | |||
ts->tv_nsec = now.tv_usec * 1000; | |||
return 0; | |||
#elif(defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) | |||
return timespec_get(ts, TIME_UTC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was annoying m. std::timespec_get(...) doesn't exist but timespec_get(...) does
@gimesketvirtadieni PR updated for Windows/OSX/Linux. Thanks for the work on this |
Inherited changes from: gimesketvirtadieni's #90
** not yet unit tests which is sad. It'll be added! this was exploratory coding more than TDD
** not yet Windows support.