[ https://issues.apache.org/jira/browse/TS-4532?focusedWorklogId=28123&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28123 ]
ASF GitHub Bot logged work on TS-4532: -------------------------------------- Author: ASF GitHub Bot Created on: 05/Sep/16 16:09 Start Date: 05/Sep/16 16:09 Worklog Time Spent: 10m Work Description: Github user SolidWallOfCode commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/965#discussion_r77540649 --- Diff: iocore/eventsystem/I_Thread.h --- @@ -168,21 +168,21 @@ class Thread @note This also updates the cached time. */ - static ink_hrtime get_hrtime_updated(); + static ts_hrtick get_hrtime_updated(); }; extern Thread *this_thread(); -TS_INLINE ink_hrtime +TS_INLINE ts_hrtick Thread::get_hrtime() { return cur_time; } -TS_INLINE ink_hrtime +TS_INLINE ts_hrtick Thread::get_hrtime_updated() { - return cur_time = ink_get_hrtime_internal(); + return cur_time = std::chrono::high_resolution_clock::now(); --- End diff -- Wrong. Should be ``ts_hrtick::clock::now()``. Issue Time Tracking ------------------- Worklog Id: (was: 28123) Time Spent: 1h 20m (was: 1h 10m) > Static type checking for time units > ----------------------------------- > > Key: TS-4532 > URL: https://issues.apache.org/jira/browse/TS-4532 > Project: Traffic Server > Issue Type: Improvement > Components: Core > Reporter: James Peach > Assignee: Alan M. Carroll > Fix For: 7.0.0 > > Time Spent: 1h 20m > Remaining Estimate: 0h > > Since the various time units {{ink_time_t}}, {{time_t}}, {{ink_hrtime}} are > all typedefs of C integral types, it is very hard to ensure that units are > being converted and compared correctly. > Consider wrapping these in trivial classes as part of making the time APIs > more straightforward. Alternatively, if we move to {{C++11}} investigate > {{std::chrono}} for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)