[jira] [Commented] (TS-4532) Static type checking for time units

2016-09-06 Thread Alan M. Carroll (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15467424#comment-15467424
 ] 

Alan M. Carroll commented on TS-4532:
-

Moving out to 7.1.0, this is way too invasive to drop just before the branch.

> 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.1.0
>
>  Time Spent: 3.5h
>  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)


[jira] [Commented] (TS-4532) Static type checking for time units

2016-09-05 Thread Alan M. Carroll (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15466248#comment-15466248
 ] 

Alan M. Carroll commented on TS-4532:
-

Forget ``NumericType``, I think ``std::chrono`` is overall more useful. I have 
[pull request|https://github.com/SolidWallOfCode/trafficserver/pull/1] with a 
partial conversion to start a discussion.

> 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: 3.5h
>  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)


[jira] [Commented] (TS-4532) static type checking for time units

2016-08-19 Thread Alan M. Carroll (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15428639#comment-15428639
 ] 

Alan M. Carroll commented on TS-4532:
-

This is what {{NumericType}} is for (see {{lib/tsconfig/NumericType.h}}).

> 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
> Fix For: 7.0.0
>
>
> 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)