You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/02/03 23:55:40 UTC

[GitHub] [trafficserver] bneradt commented on a change in pull request #7482: Add basic type aliases for std::chrono types to ink_time.h for future use.

bneradt commented on a change in pull request #7482:
URL: https://github.com/apache/trafficserver/pull/7482#discussion_r569834680



##########
File path: include/tscore/ink_time.h
##########
@@ -43,7 +45,17 @@
 
  *===========================================================================*/
 
-typedef time_t ink_time_t;
+using ink_time_t  = time_t;
+using ts_clock    = std::chrono::system_clock;
+using ts_time     = ts_clock::time_point;
+using ts_hr_clock = std::chrono::high_resolution_clock;
+using ts_hr_time  = ts_hr_clock::time_point;
+
+using ts_seconds      = std::chrono::seconds;
+using ts_milliseconds = std::chrono::milliseconds;

Review comment:
       Any reason not to add ts_microseconds while we're at it? That's not an uncommon unit. In fact there's a reference to microseconds later in this file.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org