[ 
https://issues.apache.org/jira/browse/GEODE-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16245812#comment-16245812
 ] 

ASF GitHub Bot commented on GEODE-3136:
---------------------------------------

dgkimura commented on a change in pull request #144: GEODE-3136: Convert time 
values to std::chrono::duration.
URL: https://github.com/apache/geode-native/pull/144#discussion_r149991453
 
 

 ##########
 File path: clicache/src/TimeSpanUtils.hpp
 ##########
 @@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "begin_native.hpp"
+#include <chrono>
+#include <geode/util/chrono/duration.hpp>
+#include "end_native.hpp"
+
+namespace Apache
+{
+  namespace Geode
+  {
+    namespace Client
+    {
+      using namespace System;
+      using namespace apache::geode::util::chrono::duration;
+
+      using ticks = std::chrono::duration<long long, std::ratio<1, 10000000>>;
+      
+      class TimeSpanUtils
+      {
+      public:
+        template <class _Duration>
+        inline static _Duration TimeSpanToDurationCeil(TimeSpan timeSpan)
+        {
+          return _ceil<_Duration>(TimeSpanToDuration(timeSpan));
 
 Review comment:
   I like the idea of moving internal rather than relying on convention.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Replace all public API time values with std::chrono types
> ---------------------------------------------------------
>
>                 Key: GEODE-3136
>                 URL: https://issues.apache.org/jira/browse/GEODE-3136
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Jacob S. Barrett
>            Assignee: Jacob S. Barrett
>
> Remove ambiguity of time values by using 
> [{{std::chrono}}|http://en.cppreference.com/w/cpp/chrono] types in the public 
> API. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to