[
https://issues.apache.org/jira/browse/TS-4532?focusedWorklogId=28135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28135
]
ASF GitHub Bot logged work on TS-4532:
--------------------------------------
Author: ASF GitHub Bot
Created on: 05/Sep/16 17:56
Start Date: 05/Sep/16 17:56
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_r77548123
--- Diff: iocore/eventsystem/PQ-List.cc ---
@@ -22,18 +22,31 @@
*/
#include "P_EventSystem.h"
+typedef std::chrono::duration<uint32_t,
std::ratio<1,PQ_BUCKET_TIME(0).count()> > bucket_time;
--- End diff --
I think this is wrong. The ratio should be something like ``<5,1000>`` not
``<1, 5000>``.
Issue Time Tracking
-------------------
Worklog Id: (was: 28135)
Time Spent: 3h (was: 2h 50m)
> 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: 3h
> 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)