time_utils.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Tencent is pleased to support the open source community by making Mars available.
  2. // Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
  3. // Licensed under the MIT License (the "License"); you may not use this file except in
  4. // compliance with the License. You may obtain a copy of the License at
  5. // http://opensource.org/licenses/MIT
  6. // Unless required by applicable law or agreed to in writing, software distributed under the License is
  7. // distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  8. // either express or implied. See the License for the specific language governing permissions and
  9. // limitations under the License.
  10. /*
  11. * utils.h
  12. *
  13. * Created on: 2012-7-18
  14. * Author: yerungui
  15. */
  16. #ifndef COMM_UTILS_H_
  17. #define COMM_UTILS_H_
  18. #include <stdint.h>
  19. #include <stdio.h>
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. uint64_t gettickcount(); // ms
  24. int64_t gettickspan(uint64_t _old_tick); // ms
  25. uint64_t timeMs();
  26. uint64_t clock_app_monotonic(); // ms
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif /* COMM_UTILS_H_ */